public JsonResult JsonMachineDetail(int MachineId = 0) { List <MachineDetail> MachineDetail = new List <MachineDetail>(); LiveMonitoringAPIController oAPI = new LiveMonitoringAPIController(); try { int customerId = Utility.GetCustomerId(); DateTime dFrom = Utility.GetStartDate(); DateTime dTo = Utility.GetEndDate(); MachineDetail = oAPI._Users(customerId, MachineId); } catch (Exception e) { ExceptionHandler handler = new ExceptionHandler(); handler.HandleException(e); } return(Json(MachineDetail, JsonRequestBehavior.AllowGet)); }
// // GET: /MachineDetail/ public ActionResult Index(int MachineId = 0) { //Check Authorization if (!cls_Authorization.isAllowedURL("Report_MachineDetails")) { return(RedirectToAction("login", "account")); } List <MachineDetail> MachineDetail = new List <MachineDetail>(); LiveMonitoringAPIController oAPI = new LiveMonitoringAPIController(); try { int customerId = Utility.GetCustomerId(); DateTime dFrom = Utility.GetStartDate(); DateTime dTo = Utility.GetEndDate(); MachineDetail = oAPI._Users(customerId, MachineId); } catch (Exception e) { ExceptionHandler handler = new ExceptionHandler(); handler.HandleException(e); } return(View(MachineDetail)); }