Ejemplo n.º 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"));
        }
Ejemplo n.º 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"));
        }
Ejemplo n.º 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"));
        }