private void Btn_Login_Click(object sender, EventArgs e) { fMain f = new fMain(); this.Hide(); f.ShowDialog(); this.Show(); }
private void Btn_Login_Click(object sender, EventArgs e) { string username = Txb_UserName.Text; string password = Txb_Password.Text; if (Login(username, password)) { Txb_Password.Clear(); fMain f = new fMain(); f.Tag = AccountDAO.Instance.GetAccountByUsername(username); this.Hide(); f.ShowDialog(); this.Show(); } else { MessageBox.Show("Wrong Username or Password!"); } }