예제 #1
0
        public ActionResult Dic()
        {
            TS_DICDTO dicDto = new TS_DICDTO();
            //获取数据字典列表
            PageResult <TS_DIC> ef = service.GetDics(dicDto);
            //获取分页数据
            BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef);

            this.HttpContext.Session["Page"] = page;
            //EF实体数据转换为DTO
            dicDto.Dics = MAPPING.ConvertEntityToDtoList <TS_DIC, TS_DICDTO>(ef.DataList.OrderBy(x => x.C_TYPECODE).ThenBy(x => x.C_DETAILCODE).ToList());
            return(View(dicDto));
        }