コード例 #1
0
        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));
        }
コード例 #2
0
        //
        // 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));
        }