Esempio n. 1
0
 private void AddButton(object sender, RoutedEventArgs e)
 {
     ProgramPersons.Add(new Person());
     PeopleList.SelectedIndex = ProgramPersons.Count - 1;
     TextName.Text            = "Name";
     TextSalary.Text          = "0";
     TextAge.Text             = "0";
     TextName.SelectAll();
     TextSalary.SelectAll();
     TextAge.SelectAll();
     TextName.Focus();
 }
Esempio n. 2
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.");
     }
 }