예제 #1
0
        public JsonResult GetOrganizeWells(int OrganizeId = 0)
        {
            string oidList = OrganizeService.GetOrganizeNodeChildren(OrganizeId);
            IEnumerable <WellModel> Items   = WellService.GetListObjectByOrganize(oidList);
            List <SelectOption>     _select = new List <SelectOption>();


            if (Items != null && Items.Count() > 0)
            {
                foreach (var item in Items)
                {
                    SelectOption _option = new SelectOption
                    {
                        id    = item.IO_DeviceID.ToString(),
                        name  = item.WellName,
                        value = item.IO_DeviceID.ToString()
                    };
                    _select.Add(_option);
                }
            }

            return(Json(_select, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult GetWells(int OrganizeId = 0)
        {
            IEnumerable <WellModel> Items = WellService.GetListObjectByOrganize("");

            return(Json(Items.ToList(), JsonRequestBehavior.AllowGet));
        }