// GET: Appointment/Details/5 public ActionResult Details(int id) { try { Appointment appointment = appointmentBusiness.GetById(id); if (appointment == null) { return(HttpNotFound()); } return(View(AppointmentModel.ToModel(appointment))); } catch (Exception ex) { Log.Error(ex.Message, ex); return(View()); } }
public ActionResult GetView(string id, string viewName, string message = "") { ViewBag.error = TempData["error"]; Appointment app = null; if (id.Length > 0) { app = appBLL.GetById(Int32.Parse(id)); } ViewBag.DoctorId = new SelectList(docBLL.List(), "Id", "Name"); ViewBag.PatientId = new SelectList(patientBLL.List(), "Id", "Name"); ViewBag.RoomId = new SelectList(roomBLL.List(), "Id", "Name"); if (message.Length > 0) { ViewBag.message = message; } return(PartialView(viewName, app)); }