Exemplo n.º 1
0
        public ActionResult GetAllDevicesPartial(long LayerId)
        {
            var loginInfo  = SessionLoginInfo.GetInstance(Session);
            var allModels  = new List <IDevice>();
            var allDevices = DeviceModelReg.GetModels(LayerId);

            allDevices.ForEach(m => m.SetUrlHelper(Url));
            allModels.AddRange(allDevices);

            var allLines = LineModelReg.GetModels(LayerId);

            allLines.ForEach(m => m.SetUrlHelper(Url));
            allModels.AddRange(allLines);

            return(PartialView("_AllDevicesPartial", allModels));
        }
Exemplo n.º 2
0
        public ActionResult GetAllDeviceDatas(string LayerIds)
        {
            var loginInfo = SessionLoginInfo.GetInstance(Session);
            var allModels = new List <IDevice>();

            var allDevices = DeviceModelReg.GetModels(LayerIds);

            allDevices.ForEach(m => m.SetUrlHelper(Url));
            allModels.AddRange(allDevices);
            var allLines = LineModelReg.GetModels(LayerIds);

            allLines.ForEach(m => m.SetUrlHelper(Url));
            allModels.AddRange(allLines);
            var r = new {
                Datas = allModels
            };

            return(Json(r));
        }