Exemple #1
0
 public bool CheckIfExist(Person _person)
 {
     if (_people.Exists(p => p == _person))
     {
         return true;
     }
     return false;
 }
 private void SayHiExecute()
 {
     MessageBox.Show(string.Format("Witaj {0} {1}", _person.FirstName, _person.LastName));
     _repo.SavePerson(_person);
     _person = new Person();
     OnPropertyChanged("FirstName");
     OnPropertyChanged("LastName");
     OnPropertyChanged("Address");
 }
 private bool PersonExist(Person _person)
 {
     return _repo.CheckIfExist(_person);
 }
 public MainWindowViewModel()
 {
     _person = new Person();
     _repo = new DataRepository();
 }
Exemple #5
0
 public Person(Person _person)
 {
     FirstName = _person.FirstName;
     LastName = _person.LastName;
     Address = _person.Address;
 }
Exemple #6
0
 public void SavePerson(Person _person)
 {
     _people.Add(new Person(_person));
     SerializeFileData();
 }