Beispiel #1
0
 public List <ModuleMenuDTO> GetBackStageMenu(int id = -1)
 {
     if (id < 0)
     {
         var ret = this._moduleMenuRepository.Select(it => it.IsDeleted == false && it.IsEnable == true && it.IsVisible == true && it.IsPage == false && it.ParentId == null && it.MenuType == MenuType.BackStage,
                                                     ModuleMenuMapping.ConvertToDTO());
         return(ret.ToList());
     }
     else
     {
         return(this._moduleMenuRepository.Select(it => it.IsDeleted == false && it.IsEnable == true && it.IsVisible == true && it.IsPage == false &&
                                                  (it.ParentId == id || it.Parent.ParentId == id || it.Parent.Parent.ParentId == id || it.Parent.Parent.Parent.ParentId == id) &&
                                                  it.MenuType == MenuType.BackStage,
                                                  ModuleMenuMapping.ConvertToDTO())
                .ToList());
     }
 }
Beispiel #2
0
 public List <ModuleMenuDTO> GetAllMenu()
 {
     return(this._moduleMenuRepository.Select(it => it.IsDeleted == false, ModuleMenuMapping.ConvertToDTO()).ToList());
 }