예제 #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string password    = txtPassword.Text;
            string NguoiDungID = BusinessLayer.cls_Employess._checkLogin(txtTenDangNhap.Text, password);

            if (NguoiDungID != "ERROR")
            {
                using (frm_Main fm = new frm_Main(NguoiDungID))
                {
                    this.Hide();
                    fm.ShowDialog();
                    this.Show();
                }
            }
            else
            {
                MessageBox.Show("Sai tên tài khoản hoặc mật khẩu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtTenDangNhap.Focus();
            }
        }
예제 #2
0
 private void frm_Main_Load(object sender, EventArgs e)
 {
     _loadPermission();
     _obj = this;
 }