void DangNhap() { if (!string.IsNullOrEmpty(txtTaiKhoan.Text) && !string.IsNullOrEmpty(txtMatKhau.Text)) { if (DangNhapBLL.XemDL("*", txtTaiKhoan.Text.Trim(), txtMatKhau.Text.Trim()).Rows.Count != 0) { frmMain formMain = new frmMain(); frmMain.Quyen = (Quyen)Enum.Parse(typeof(Quyen), DangNhapBLL.XemDL("QUYEN", txtTaiKhoan.Text, txtMatKhau.Text).Rows[0][0].ToString()); formMain.username = txtTaiKhoan.Text.Trim(); this.Hide(); formMain.ShowDialog(); this.Close(); } else { labStatus.Visible = true; txtMatKhau.Clear(); } } }
void DangNhap() { if (!string.IsNullOrEmpty(txtTaiKhoan.Text) && !string.IsNullOrEmpty(txtMatKhau.Text)) { if (DangNhapBLL.XemDL("*", txtTaiKhoan.Text, txtMatKhau.Text).Rows.Count != 0) { frmThongTinTaiKhoan.tenDangNhap = txtTaiKhoan.Text; frmThongTinTaiKhoan.matKhau = txtMatKhau.Text; frmThayDoiMatKhau.taiKhoan = txtTaiKhoan.Text; frmMain formMain = new frmMain(); frmMain.quyen = DangNhapBLL.XemDL("QUYEN", txtTaiKhoan.Text, txtMatKhau.Text).Rows[0][0].ToString(); this.Hide(); formMain.ShowDialog(); this.Close(); } else { labStatus.Visible = true; txtMatKhau.Clear(); } } }