public ActionResult SetRecalls(int currentDoctor) { RecallView newRecall = new RecallView(); newRecall.DoctorID = currentDoctor; newRecall.Date = DateTime.Now; ViewBag.DoctorName = _repository.GetDoctorByID(currentDoctor).Name; return View(newRecall); }
public ActionResult SetRecalls(RecallView newRecall) { var currentRecall = (Recall)_mapper.Map(newRecall, typeof(RecallView), typeof(Recall)); SaveRecall(currentRecall); return RedirectToAction("GetRecalls", "Recall", new { currentDoctor = currentRecall.DoctorID}); }