Example #1
0
 public EditDoctorViewModel(EditDoctorView doctorView, vwClinicDoctor doctorToEdit)
 {
     this.doctorView = doctorView;
     ClinicDoctor    = doctorToEdit;
     GenderList      = genders.GetGenders();
     ShiftList       = shifts.GetShifts();
     ManagerList     = managers.ManagersWhoCanSupervise();
     OldDoctor       = new vwClinicDoctor
     {
         Citizenship                    = doctorToEdit.Citizenship,
         DateOfBirth                    = doctorToEdit.DateOfBirth,
         Gender                         = doctorToEdit.Gender,
         IdentityCardNumber             = doctorToEdit.IdentityCardNumber,
         NameAndSurname                 = doctorToEdit.NameAndSurname,
         Password                       = doctorToEdit.Password,
         Username                       = doctorToEdit.Username,
         BankAccountNumber              = doctorToEdit.BankAccountNumber,
         Department                     = doctorToEdit.Department,
         ResponsibleForPatientAdmission = doctorToEdit.ResponsibleForPatientAdmission,
         Shift           = doctorToEdit.Shift,
         SuperiorManager = doctorToEdit.SuperiorManager,
         UniqueNumber    = doctorToEdit.UniqueNumber,
         Manager         = doctorToEdit.Manager
     };
 }
 public AddDoctorViewModel(AddDoctorView doctorView)
 {
     this.doctorView = doctorView;
     ClinicDoctor    = new vwClinicDoctor();
     GenderList      = genders.GetGenders();
     ShiftList       = shifts.GetShifts();
     ManagerList     = managers.ManagersWhoCanSupervise();
 }
Example #3
0
 public EditDoctorView(vwClinicDoctor doctor)
 {
     InitializeComponent();
     this.DataContext = new EditDoctorViewModel(this, doctor);
 }