示例#1
0
        public ActionResult DeleteDoctor(int id)
        {
            DoctorDTO doctor = doctorService.GetDoctors().FirstOrDefault(doctorId => doctorId.DoctorId == id);

            if (doctor != null)
            {
                return(View(MapperUtilVM.MapToDoctorVM(doctor)));
            }
            else
            {
                ViewBag.Title   = "Ошибка удаления врача.";
                ViewBag.Message = "Не удалось найти врача для удаления с идентификационным номером = " + id;
                return(View("Error"));
            }
        }
示例#2
0
 public ActionResult EditDoctor(int id)
 {
     return(View(MapperUtilVM.MapToDoctorVM(doctorService.GetDoctors().FirstOrDefault(doctorID => doctorID.DoctorId == id))));
 }