public IActionResult DetailRecord(int id, string startDate, string endDate) { ParamaterSearch paramater = new ParamaterSearch { id = id, startDate = startDate, endDate = endDate }; ViewBag.Parameter = paramater; return(PartialView("_DetailRecord", ViewBag.Parameter)); }
/// <summary> /// Load view detail Machine /// </summary> /// <param name="id">MachineId</param> /// <param name="startDate"></param> /// <param name="endDate"></param> /// <returns></returns> public IActionResult GetViewDetailMachine(int id, string startDate, string endDate) { ParamaterSearch paramater = new ParamaterSearch { id = id, startDate = startDate, endDate = endDate }; var machine = _db.Machines.Include(m => m.CustomFields).Where(m => m.MachineId == id).FirstOrDefault(); var customFieds = machine.CustomFields.OrderByDescending(c => c.FieldId).ToList(); ViewBag.customFieds = customFieds; ViewBag.Parameter = paramater; return(PartialView("_GetDetailMachine", machine)); }