public ActionResult RemoveEventScheduleByID(int id) { using (var service = new EventScheduleService()) { service.Delete(id); } return(null); }
public JsonResult Send() { using (var service = new EventScheduleService()) { int pharmacyCode = User.Pharmacy.Code; //get all scheduled events where the date is today EventProcessingService.SendEvents(service.GetEventsBeforeToday().Where(x => x.Event.Patient.Pharmacy.Code == pharmacyCode).Select(es => es.Event).ToList(), pharmacyCode); } return(Json(true)); }
public ActionResult ReturnTable() { List <DayEventModel> models = new List <DayEventModel>(); using (var service = new EventScheduleService()) { //get all scheduled events where the date is today models = service.GetEventsBeforeToday() .Where(x => x.Event.Patient.Pharmacy.Code == User.Pharmacy.Code) .Select(e => new DayEventModel(e)) .ToList(); } return(PartialView(models)); }