Example #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string   username = txtUsername.Text.Trim();
            string   password = txtPassword.Text.Trim();
            StaffDTO staff    = null;
            StaffDAO dao      = new StaffDAO();
            bool     result   = dao.CheckLogin(username, password, ref staff);

            if (result)
            {
                Session["STAFF_USER"] = staff;
                Response.Redirect("StaffWorkspace.aspx");
            }
            else
            {
                this.invalidLogin.CssClass = "error_message_show";
                this.txtPassword.Text      = "";
            }
        }