private void SignIn_OnClick(object sender, RoutedEventArgs e) { var username = UsernameTxt.Text; var pass = PasswordTxt.SecurePassword; var result = SqlConnect.VerifyUser(username, pass); if (!result.Valid) { MessageBox.Show($@"Username or password is incorrect"); } else { Hide(); var incomeForm = new IncomeForm(result.Id); incomeForm.Closed += (s, args) => Close(); incomeForm.Show(); } }
private void SignIn_Click(object sender, EventArgs e) { var username = usernameTxt.Text; var pass = passwordTxt.Text; var result = _sql.VerifyUser(username, pass); if (!result.Valid) { MessageBox.Show($@"This {username} is not existed or password is incorrect"); } else { this.Hide(); var form = new Form1(result.Id); form.Closed += (s, args) => this.Close(); form.Show(); } }