private void btnLogin_Click_1(object sender, EventArgs e) { if (b_user.Call_Get_accuracy(txttk.Text, txtmk.Text)) { frm_Main frmmain = new frm_Main(); frmmain.Get_name_user(txttk.Text); frmmain.FormClosed += new FormClosedEventHandler(mainForm_FormClosed); frmmain.Show(); this.Hide(); } else { MessageBox.Show("Failure"); } }
private void btnLogin_Click(object sender, EventArgs e) { int type = BUS.BUS_Users.Instance.CheckLogin(txtUserID, txtPassword); if (type != 0) { List <int> role = BUS.BUS_Users.Instance.Users_FillListRole(txtUserID.Text); frm_Main frmMain = new frm_Main(this, role); frmMain.Show(); this.Hide(); } else { MessageBox.Show("Sai tên đăng nhập hoặc mật khẩu!!!", "Thông báo", MessageBoxButtons.OK); } }