private void btnSignUp_Click(object sender, EventArgs e) { int userRole = 0; if (cmbUserRole.SelectedIndex == 0) { userRole = 0; } else { userRole = 1; } AppUser appUser = new AppUser() { UserName = txtUserName.Text, UserPassword = txtUserPassword.Text, UserEmail = txtUserEmail.Text, UserRole = userRole }; bool checkSignUp = signUpController.UserSignUpControll(appUser); if (checkSignUp) { MessageBox.Show("Success!"); SignInForm signInForm = new SignInForm(); signInForm.Show(); this.Hide(); } else { MessageBox.Show("Error!"); } }
private void BtnSignUp_Click(object sender, EventArgs e) { AppUser appUser = new AppUser() { UserName = txtUserName.Text, UserPassword = txtUserPassword.Text, UserEmail = txtUserEmail.Text, }; bool checkSignUp = signUpController.UserSignUpControll(appUser); if (checkSignUp) { MessageBox.Show("Success!"); SignInForm signInForm = new SignInForm(); signInForm.Show(); this.Hide(); } else { MessageBox.Show("Error!"); } }