/// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        public async Task <object> GetAllList()
        {
            //var result = await _iLayerManagerRepository.GetAllListAsync();
            var result = _iLayerManagerRepository.GetAllList();
            var list   = result.MapTo <List <LayerManagerDto> >();

            LayerManagerDto map1    = list.First(x => x.PID == "1"); //天地图
            LayerManagerDto note1   = list.First(x => x.PID == "2"); //天地图标注
            LayerManagerDto map2    = list.First(x => x.PID == "3"); //影像图
            LayerManagerDto note2   = list.First(x => x.PID == "4"); //影像图标注
            List <Gislayer> gislist = CreatTree(list, "0000");       //gis图层树

            return(new
            {
                BaseMap = new { map = map1, note = note1 },
                StatelliteMap = new { map = map2, note = note1 },
                GisLayer = gislist
            });
        }
 public async Task <PagedResultOutput <LayerManagerDto> > Update(int pageIndex, int pageSize, LayerManagerDto input)
 {
     //Tbl_LayerManager lm = _iLayerManagerRepository.Get(input.Id);
     ////lm.PID = input.PID;
     ////lm.LABEL = input.LABEL;
     ////lm.ZOOMLEVEL = input.ZOOMLEVEL;
     ////lm.URL = input.URL;
     ////lm.DATASERVERKEY = input.DATASERVERKEY;
     ////lm.TILESIZE = 512;
     ////lm.ZEROLEVELSIZE = input.ZEROLEVELSIZE;
     ////lm.PICTYPE = input.PICTYPE;
     ////_iLayerManagerRepository.Update(lm);
     ////QueryLayerManagerInput queryInput = new QueryLayerManagerInput
     ////{
     ////    PageIndex = pageIndex,
     ////    PageSize = pageSize
     ////};
     //return await GetPageListAndCount(queryInput);
     throw new NotImplementedException();
 }
Example #3
0
        public async Task <PagedResultOutput <LayerManagerDto> > Update(int pageIndex, int pageSize, LayerManagerDto input)
        {
            Tbl_LayerManager lm = _iLayerManagerRepository.Get(input.Id);

            lm.PID           = input.PID;
            lm.LABEL         = input.LABEL;
            lm.ZOOMLEVEL     = input.ZOOMLEVEL;
            lm.URL           = input.URL;
            lm.DATASERVERKEY = input.DATASERVERKEY;
            lm.TILESIZE      = 512;
            lm.ZEROLEVELSIZE = input.ZEROLEVELSIZE;
            lm.PICTYPE       = input.PICTYPE;
            _iLayerManagerRepository.Update(lm);
            QueryLayerManagerInput queryInput = new QueryLayerManagerInput
            {
                PageIndex = pageIndex,
                PageSize  = pageSize
            };

            return(await GetPageListAndCount(queryInput));
        }