private void btn_DangNhap_Click(object sender, EventArgs e) { _dTO_TaiKhoan = _taiKhoanFs.GetTaiKhoanTheoTenDangNhap(txt_TenDangNhap.Text); if (txt_TenDangNhap.Text == _dTO_TaiKhoan.Username && txt_MatKhau.Text == _dTO_TaiKhoan.Pass) { Cls_Main.tenNhanVien = _dTO_TaiKhoan.Name; this.Close(); MessageBox.Show("Đăng nhập thành công!!!"); } else { MessageBox.Show("Đăng nhập thất bại!!!"); } }
private void Frm_DangNhap_Load(object sender, EventArgs e) { _taiKhoanFs = new TaiKhoanFs(); _dTO_TaiKhoan = new DTO_TaiKhoan(); }