public void EditDoctor() { try { ClinicUser clinicUser = new ClinicUser(); clinicUser.ClinicUserId = selectedDoctor.ClinicUserId; clinicUser.FullName = selectedDoctor.FullName; clinicUser.DateOfBirth = selectedDoctor.DateOfBirth; clinicUser.IDNumber = selectedDoctor.IDNumber; clinicUser.GenderId = selectedDoctor.GenderId; clinicUser.Citizenship = selectedDoctor.Citizenship; clinicUser.Username = selectedDoctor.Username; clinicUser.Password = selectedDoctor.Password; ClinicDoctor clinicDoctor = new ClinicDoctor(); clinicDoctor.ClinicDoctorId = selectedDoctor.ClinicDoctorId; clinicDoctor.ClinicUserId = selectedDoctor.ClinicUserId; clinicDoctor.UniqueNumber = selectedDoctor.UniqueNumber; clinicDoctor.BancAccount = selectedDoctor.BancAccount; clinicDoctor.DepartmentId = selectedDoctor.DepartmentId; clinicDoctor.WorkShiftId = selectedDoctor.WorkShiftId; clinicDoctor.InChargeOfAdmission = selectedDoctor.InChargeOfAdmission; clinicDoctor.ClinicManagerId = selectedDoctor.ClinicManagerId; AddDoctorView addDoctorView = new AddDoctorView(User, clinicUser, clinicDoctor, true); addDoctorView.Show(); doctorView.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public void AddNewDoctorExecute() { try { AddDoctorView addDoctorView = new AddDoctorView(User, new ClinicUser(), new ClinicDoctor(), false); addDoctorView.Show(); doctorView.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }