Ejemplo n.º 1
0
        private void button_SignUp_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Users newUser = new Users();

                newUser.UserName  = textBox_UserName.Text;
                newUser.Password  = passwordBox.Password.ToString();
                newUser.FirstName = textBox_FirstName.Text;
                newUser.LastName  = textBox_LastName.Text;

                int rowsAffected = UserValidation.AddClerk_BLL(newUser);
                if (rowsAffected > 0)
                {
                    MessageBox.Show("Sign Up Successful");
                }
                else
                {
                    MessageBox.Show("Signup Failed");
                }
            }
            catch (HRMSException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch (SystemException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }