private void btnLogin_Click(object sender, EventArgs e) { string userName = txtUserName.Text; string password = txtPassWord.Text; if (!Login(userName, password)) { MessageBox.Show("Sai tên tài khoản hoặc mật khẩu", "Thông tin không hợp lệ"); return; } Account account = AccountDAO.Instance.GetAccountByUserName(userName); fTableManager f = new fTableManager(account); this.Hide(); f.ShowDialog(); this.Show(); }
private void btnLogin_Click(object sender, EventArgs e) { string username = txtUsername.Text.Trim(); string password = txtPassword.Text.Trim(); if (Login(username, password)) { AccountDTO account = AccountDAO.Instance.GetAccountByUsername(username); fTableManager f = new fTableManager(account); this.Hide(); f.ShowDialog(); txtUsername.Text = ""; txtPassword.Text = ""; this.Show(); } else { MessageBox.Show("Invalid username or password!!!"); } }