public IActionResult Edit(int Id) { LoadsServices ld = new LoadsServices(_Context); var load = ld.GetLoadById(Id); ViewBag.Functions = ld.GetAllFunctions(); return(View(load)); }
public IActionResult HarmonicOrder(DateTime date, int HarmOrder = -1, int loadId = -1) { RushHourViewModel res = new RushHourViewModel(); ReportService rs = new ReportService(_Context); LoadsServices ls = new LoadsServices(_Context); ViewBag.loads = ls.GetAllLoads(); if (HarmOrder != -1) { res = rs.HaemonicOrderForLoadId(loadId, date, HarmOrder); ViewBag.LoadName = (ls.GetLoadById(loadId)).name; } return(View(res)); }
public LoadDataModel GetLoadDetails(int Id) { LoadsServices ls = new LoadsServices(_Context); return(ls.GetLoadById(Id)); }