示例#1
0
        public IList <ModuleViewModel> Get()
        {
            var response = _moduleAppService.GetAll();

            viewModelList = _mapper.Map <IList <Module>, IList <ModuleViewModel> >(response);

            return(viewModelList);
        }
示例#2
0
        public async Task <IList <ModuleQueryDto> > GetModulesWithElements(EntityRequest input)
        {
            var modules = await _moduleAppService.GetAll();

            var moduleIds      = modules.Select(m => m.Id).ToList();
            var moduleElements = await _moduleElementAppService.GetElementByModuleIds(moduleIds);

            foreach (var item in modules)
            {
                item.ModuleElementActionRequests = moduleElements.Where(e => e.ModuleId == item.Id).ToList();
            }
            return(modules);
        }
示例#3
0
        public MenuItemDefinition AddMenus()
        {
            #region 动态菜单
            var modules = _moduleAppService.GetAll();
            var project = new MenuItemDefinition(
                "Business",
                L("Business"),

                icon: "menu",
                order: 5
                );

            var list = modules.ToList();
            FillMenu(project, 0, list);
            return(project);

            #endregion
        }
示例#4
0
 /// <summary>
 /// 获取全部
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public async Task <List <ModuleQueryDto> > GetAll(EntityRequest input)
 {
     return(await _moduleAppService.GetAll());
 }