예제 #1
0
        public ActionResult DevicesChart()
        {
            //string id  = Request.Query["roomID"];

            List <DevicesListModel> lists = GetAllDevices();

            ViewBag.charttitle = Request.Query["title"];
            ViewBag.chartType  = Request.Query["chartType"];
            ViewBag.position   = Request.Query["position"];
            ViewBag.download   = Request.Query["download"];

            ViewBag.datasets = ChartData(lists, Request.Query["sensorType"]);

            ChartController chart = new ChartController();

            ViewBag.day   = chart.GetChartTime();
            ViewBag.divId = chart.GetRandomDivId();

            return(PartialView("_DevicesChart"));
        }
예제 #2
0
        public ActionResult SensorsChart()
        {
            //string id  = Request.Query["roomID"];

            //List<SensorsListModel> lists = GetSensorsData();

            ViewBag.charttitle = Request.Query["title"];
            ViewBag.chartType  = Request.Query["chartType"];
            ViewBag.position   = Request.Query["position"];
            ViewBag.download   = Request.Query["download"];

            Debug.WriteLine("****" + _sensorList.ToJson().ToString());
            ViewBag.datasets = ChartData(_sensorList, Request.Query["sensorType"]);

            ChartController chart = new ChartController();

            ViewBag.day   = chart.GetChartTime();
            ViewBag.divId = chart.GetRandomDivId();

            return(PartialView("_SensorsChart"));
        }
예제 #3
0
        public ActionResult SensorsChartByRoomid()
        {
            string id = "";

            id = Request.Query["roomID"];

            List <SensorsListModel> lists = GetSensorsData().Where(x => x.roomId.Contains(id)).ToList();

            ViewBag.charttitle = Request.Query["title"];
            ViewBag.chartType  = Request.Query["chartType"];
            ViewBag.position   = Request.Query["position"];
            ViewBag.download   = Request.Query["download"];

            ViewBag.datasets = ChartData(lists, Request.Query["sensorType"]);

            ChartController chart = new ChartController();

            ViewBag.day   = chart.GetChartTime();
            ViewBag.divId = chart.GetRandomDivId();

            return(PartialView("_SensorsChart"));
        }