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")); }
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")); }
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")); }