protected void uiButtonLogin_Click(object sender, EventArgs e) { SiteUsers user = new SiteUsers(); uiLabelError.Visible = false; uiLabelError.Visible = false; user.GetUserByUserNameAndPassword(uiTextBoxUserName.Text, uiTextBoxPassword.Text); if (user.RowCount == 0) { uiLabelError.Visible = true; } else { if (user.IsColumnNull("IsApproved") || !user.IsApproved) { uiLabelError.Visible = false; uiLabelNotApproved.Visible = true; } else { Session["CurrentUser"] = user; ViewLoginPanel(); } } }
protected void uiButtonUpdate_Click(object sender, EventArgs e) { SiteUsers user = new SiteUsers(); uiLabelError.Visible = false; user.GetUserByUserNameAndPassword(uiTextBoxUserName.Text, uiTextBoxPassword.Text); if (user.RowCount == 0) { uiLabelError.Visible = true; } else { if (user.IsColumnNull("IsApproved") || !user.IsApproved) { uiLabelError.Visible = false; uiLabelNotApproved.Visible = true; } else { Session["CurrentUser"] = user; Response.Redirect("Default.aspx"); } } }