Esempio n. 1
0
 protected void ButtonLogin_Click(object sender, EventArgs e)
 {
     TaiKhoanDAO tkDao = new TaiKhoanDAO();
     List<TaiKhoanDTO> tk = tkDao.SelectTaiKhoan_Username(TextBoxUsername.Text);
     Label1.Text = tk[0].PASSWORD1;
     if (tk[0].PASSWORD1 == TextBoxPassword.Text)
         Label1.Text = "dung";
 }
Esempio n. 2
0
 protected void ButtonLogin_Click(object sender, EventArgs e)
 {
     TaiKhoanDAO tkDao = new TaiKhoanDAO();
     List<TaiKhoanDTO> tk = tkDao.SelectTaiKhoan_Username(TextBoxUsername.Text);
     if (tk[0].PASSWORD1 == TextBoxPassword.Text)
     {
         Session["IsLogin"] = 1;
         Session["Username"] = tk[0].USERNAME1;
         Session["MaDN"] = tk[0].MADN1;
         Response.Redirect("TrangChuDoanhNghiep.aspx");
     }
     else
     {
         Label1.Text = "Đăng nhập không thành công. Vui lòng thử lại!";
         Label1.Visible = true;
     }
 }