Exemple #1
0
 public void DeletePatient()
 {
     try
     {
         PatientV = PatientM.GetPatient(PatientSelected);
         PatientM.DeletePatient(PatientV);
         PatientIds.Remove(PatientV.PatientId);
         (App.Current as App).navigation.MainWindows.comments.Text = " המטופל הוסר בהצלחה מהמערכת";
     }
     catch (Exception e)
     {
         (App.Current as App).navigation.MainWindows.comments.Text = e.Message.ToString();
     }
 }
Exemple #2
0
 public void AddPatient()
 {
     try
     {
         if (Id == null || Fname == null || Lname == null || PhoneNum == null || MailAddress == null)
         {
             throw new ArgumentException("אתה צריך למלא את כל השדות");
         }
         else
         {
             PatientV = new Patient(Id, Fname, Lname, PhoneNum, DateOfBirth, MailAddress);
             PatientM.AddPatient(PatientV);
             PatientM.SendMail(PatientV);
             PatientIds.Add(PatientV.PatientId);
             (App.Current as App).navigation.MainWindows.comments.Text = "המטופל נוסף בהצלחה";
         }
     }
     catch (Exception e)
     {
         (App.Current as App).navigation.MainWindows.comments.Text = e.Message.ToString();
     }
 }
Exemple #3
0
 public bool Any() => PatientIds.Any();