private void Button1_Click(object sender, EventArgs e) { string userName = textBox1.Text; string passWord = textBox2.Text; DataTable userLogin = Login(userName, passWord); if (userLogin.Rows.Count > 0) { this.Hide(); object typeUser = userLogin.Rows[0]["type"]; FormMenu frmMenu = new FormMenu(typeUser); { frmMenu.ShowDialog(); } } else { MessageBox.Show("Sai tên tài khoản hoặc mật khẩu!"); } }
public FormAddMenu(FormMenu fmenu) { InitializeComponent(); this.fmenu = fmenu; }