Пример #1
0
        public IHttpActionResult GetReadings(string itemKey)
        {
            QalGraph       graphModule = ModuleHub.Instance.GetModule <QalGraph>();
            List <Reading> readings    = graphModule.GetReadings(itemKey);

            return(Ok(new { readings = readings }));
        }
Пример #2
0
        public IHttpActionResult GetResumeNewDatabase(int ItemId)
        {
            QalGraph graphModule = ModuleHub.Instance.GetModule <QalGraph>();

            var resume = graphModule.GetSummary(ItemId);

            return(Ok(new { resume = resume }));
        }
Пример #3
0
        public IHttpActionResult GetResumeOldDatabase(int mID)
        {
            QalGraph graphModule = ModuleHub.Instance.GetModule <QalGraph>();

            var resume = graphModule.GetResumeOldDatabase(mID);

            return(Ok(new { resume = resume }));
        }
Пример #4
0
 public HttpResponseMessage TestWithNewDatabaseZero(string itemKey, DateTime?fromdate, DateTime?todate)
 {
     try
     {
         QalGraph graphModule            = ModuleHub.Instance.GetModule <QalGraph>();
         QalGraphDataContainer container = graphModule.GetZeroGraphData(itemKey);
         return(Request.CreateResponse(HttpStatusCode.OK, container));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Пример #5
0
 public HttpResponseMessage TestWithDatabaseZero(int objectId, int?scale, DateTime?fromdate, DateTime?todate)
 {
     try
     {
         QalGraph graphModule = ModuleHub.Instance.GetModule <QalGraph>();
         List <Trace <DateTime, decimal> > traceListTest = graphModule.TestWithDatabaseZero(1080, fromdate, todate);
         return(Request.CreateResponse(HttpStatusCode.OK, traceListTest));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Пример #6
0
        public HttpResponseMessage TestWithHardCode(int objectId, int?scale, DateTime?fromdate, DateTime?todate)
        {
            try
            {
                QalGraph graphModule = ModuleHub.Instance.GetModule <QalGraph>();
                Guid     id          = Guid.NewGuid();


                DateTime?inspectionDateFrom = null;
                DateTime?inspectionDateTo   = null;
                List <Trace <string, decimal> > traceListTest = graphModule.TestWithHardCode(objectId, inspectionDateFrom, inspectionDateTo);
                return(Request.CreateResponse(HttpStatusCode.OK, traceListTest));
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }