public UserModelPack GetPDAMenu(WcsRole role) { UserModelPack pack = new UserModelPack(); List <ModuleView> menus = new List <ModuleView>(); List <WcsMenuDtl> usermenus = MenuDtlList.FindAll(c => c.rf && c.menu_id == role.menu_id); if (usermenus.Count > 0) { usermenus.Sort((x, y) => x.order.CompareTo(y.order)); foreach (WcsMenuDtl item in usermenus) { WcsModule md = GetModule(item.module_id); if (md != null && md.ModuleType == WcsModuleTypeE.平板) { menus.Add(new ModuleView() { ModuleName = item.name, ModuleId = md.key, ModulePic = md.geometry, ModuleEntry = md.entity }); } } } pack.AddModule(menus); return(pack); }
public List <MenuModel> GetWcsMenuDtl(int menuid) { List <MenuModel> menus = new List <MenuModel>(); List <WcsMenuDtl> usermenus = MenuDtlList.FindAll(c => c.menu_id == menuid); if (usermenus.Count > 0) { usermenus.Sort((x, y) => x.order.CompareTo(y.order)); foreach (WcsMenuDtl item in usermenus) { MenuModel menumd = GetMenu(item.id); if (menumd != null) { menus.Add(menumd); } } } return(menus); }
public List <WcsMenuDtl> GetMenuDtls(int folderid) { return(MenuDtlList.FindAll(c => c.folder_id == folderid)); }