public ActionResult PatientCreate() { PatientCreateWrap patientCreateWrap = new PatientCreateWrap(); patientCreateWrap.DoctorsList = doctorRepository.getDoctorMiniInfoList(); return(View(patientCreateWrap)); }
public ActionResult PatientCreate(PatientFullDataViewModel PatientInfo) { try { PatientInfo.ClinicID = getUserCurrentClinecID(); if (!ModelState.IsValid) { PatientCreateWrap patientCreateWrap = new PatientCreateWrap(); patientCreateWrap.DoctorsList = doctorRepository.getDoctorMiniInfoList(); return(View(patientCreateWrap)); } bool check = patientRepository.addNewPatinetBasicInfo(PatientInfo); return(RedirectToAction("patientList")); } catch { PatientCreateWrap patientCreateWrap = new PatientCreateWrap(); patientCreateWrap.DoctorsList = doctorRepository.getDoctorMiniInfoList(); return(View(patientCreateWrap)); } }