Пример #1
0
 private void End_Registration(object sender, RoutedEventArgs e)
 {
     if (model.CheckingLogin(TextLogin.Text) == true)
     {
         if ((PasswordPass.Password != "") && (TextName.Text != "") && (TextLogin.Text != "") && (TextAge.ToString() != ""))
         {
             string a = TextLogin.Text;
             string b = TextName.Text;
             int    c = Int32.Parse(TextAge.Text);
             string d = PasswordPass.ToString();
             model.AddUser(a, b, c, d);
             MessageBox.Show("You are registred");
             SignIn open = new SignIn();
             open.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("All fields must be filled");
         }
     }
     else
     {
         MessageBox.Show("This login is reserved.");
     }
 }