コード例 #1
0
        private void Button_Quit_Create_User(object sender, RoutedEventArgs e)
        {
            Sign_in win = new Sign_in();

            win.Show();
            this.Close();
        }
コード例 #2
0
        private void Button_Create_User(object sender, RoutedEventArgs e)
        {
            if (txtBox_login.Text.Length == 0)
            {
                MessageBox.Show("Error : login can't be empty");
            }

            else if (txtBox_password.Text.Length == 0)
            {
                MessageBox.Show("Error : password can't be empty");
            }

            else if (txtBox_firstname.Text.Length == 0)
            {
                MessageBox.Show("Error : firstname can't be empty");
            }

            else if (txtBox_lastname.Text.Length == 0)
            {
                MessageBox.Show("Error : lastname can't be empty");
            }

            else if (userManager.CheckExistLogin(txtBox_login.Text))
            {
                MessageBox.Show("Error : this login is already used");
            }

            else
            {
                CreateNewUser();
                MessageBox.Show("New User Created");
                Sign_in win = new Sign_in();
                win.Show();
                this.Close();
            }
        }