C# .NET - Update user record in the database to reflect account is 'locked'

Asked By Glenn Boucher on 18-Apr-14 01:25 PM

   protected void btnLogin_Click(object sender, EventArgs e)

    {

  bool IsFound = false;

        clsDataLayer dl = new clsDataLayer();

 

   IsFound = dl.GetUser(Server.MapPath("~/AddressBook.mdb"), txtUserId.Text, txtPassword.Text); // Verify that your AddressBook.mdb path is correct!!!!

 

    if (IsFound)

        {

 

    Response.Redirect("~/frmUpdateAddress.aspx");

        }

        else 

        {

 

    int myAttempts = Convert.ToInt32(Session["AttemptCount"]);

            myAttempts = myAttempts + 1;

            Session["AttemptCount"] = myAttempts;

    lblStatus.Text = "The User ID and/or Password supplied is incorrect. Please try again!";

    if (myAttempts >= 3)

            {

 

        // *********************************

        // add your code here to update the user record in the database
        // to reflect that the user account is 'locked


        // *********************************


     lblStatus.Text = "Your account is disabled.";

            }
        }
    }

Robbe Morris replied to Glenn Boucher on 18-Apr-14 01:26 PM
Are you expecting us to complete your homework assignment or answer a question on your certification test?
Glenn Boucher replied to Robbe Morris on 18-Apr-14 01:40 PM
I am stuck plain and simple I just need a nudge in the right direction as everything I am looking up doesn't seem to make much sense. Thank you.