// GET: Schedules/DeleteSchedule/5 public ActionResult DeleteSchedule(int id) { var schedule = clientScheduleService.GetClientSchedule(id); if (schedule != null) { var model = Mapper.Map <ClientSchedule, ClientScheduleViewModel>(schedule); var playlist = clientScheduleService.GetSchedulePlaylist(id); model.MediaPlaylist = (List <MediaFileSelectViewModel>) Mapper.Map <IEnumerable <ClientScheduleMediaFilesList>, IEnumerable <MediaFileSelectViewModel> >(playlist); return(View(model)); } else { return(RedirectToAction("Index")); } }
// GET: API Clients/GetCurSchedule public ActionResult GetCurSchedule(int id) { var cmpId = endPlayerClientService.GetEndPlayerClient(id).CampaignID; string msg = ""; if (cmpId != null) { var schedule = clientScheduleService.GetClientSchedule((int)cmpId); if (schedule != null) { msg = clientScheduleService.GetScheduleAsString(schedule); } } //NotifyCampaignUpdate() return(Content(msg)); }