public ActionResult PendingAppointment(AppointmentSearchModel model) { model = model ?? new AppointmentSearchModel(); var appoinments = _appointmentModel.GetAllPendingAppointmentByDoctorId(model.LastDays).ToList(); model.AppointmentCollection = appoinments.ToPagedList(model.Page, model.PageSize); return(View(model)); }
public List <AppointmentModel> GetAppointments([FromUri(Name = "")] AppointmentSearchModel request) { List <AppointmentModel> appList = new List <Models.AppointmentModel>(); var appIds = _repo.GetAppointmentIds(request); foreach (int appId in appIds) { appList.Add(_repo.GetAppointment(appId)); } return(appList); }
public AppointmentController() { _appointmentSearchModel = new AppointmentSearchModel(); _appointmentModel = new AppointmentModel(); }