public IActionResult GetSchedule([FromHeader] string sendJson, int id) { ViewBag.Active = "Schedule"; List <Schedule> eventList = new List <Schedule>(); eventList.Add(ScheduleDBConnector.GetSchedule(Constants.DATA_SOURCE, id)); return(sendJson != null && sendJson.Equals("True") ? Json(eventList) : (IActionResult)View("~/Views/Schedule/Index.cshtml", eventList)); }
public void TestRetrieveSpecific() { Schedule schedule = ScheduleDBConnector.GetSchedule(dataSource, 2); Assert.NotNull(schedule); }
public IActionResult Edit(int id) { return(View(ScheduleDBConnector.GetSchedule(Constants.DATA_SOURCE, id))); }