/// <summary> /// 获取用户分配的所有菜单,如果是developmentAdmin直接获取所有的菜单。 /// </summary> /// <param name="loginID">用户登陆ID</param> /// <returns></returns> public static List <SystemMenuWrapper> GetUserAssignedMenuByUserLoginID(string loginID) { List <SystemApplicationWrapper> applications = SystemApplicationWrapper.GetUserAvaiableApplications(SystemUserWrapper.FindByLoginID(loginID)); List <SystemMenuWrapper> assignedMenus = new List <SystemMenuWrapper>(); List <SystemMenuEntity> menus = businessProxy.GetUserAssignedMenuByLoginID(loginID); if (menus == null) { return(assignedMenus); } foreach (SystemMenuEntity systemMenuWrapper in menus) { if (applications.Exists(p => (p.SystemApplicationID == systemMenuWrapper.ApplicationID.SystemApplicationID))) { assignedMenus.Add(ConvertEntityToWrapper(systemMenuWrapper)); } } return(assignedMenus); }
public static int GetNewMaxMenuOrder(int parentMenuId, int applicationId) { SystemMenuWrapper parentMenu = null; if (parentMenuId != 0) { parentMenu = SystemMenuWrapper.FindById(parentMenuId); } SystemApplicationWrapper systemApplicationWrapper = SystemApplicationWrapper.FindById(applicationId); //获取当前应用下指定的父菜单下面的最大序号的菜单 SystemMenuWrapper systemMenuWrapper = ConvertEntityToWrapper(businessProxy.GetNewMaxMenuByParentMenuAndApplication(parentMenu.entity, systemApplicationWrapper.entity)); if (systemMenuWrapper == null) { return(1); } else { return(systemMenuWrapper.MenuOrder.Value + 1); } }
public static List <SystemPersonalizationSettingsWrapper> FindAllByApplicationID(SystemApplicationWrapper applicationID) { return(ConvertToWrapperList(businessProxy.FindAllByApplicationID(applicationID.Entity))); }
public static List <SystemPersonalizationSettingsWrapper> FindAllByOrderByAndFilterAndApplicationID(string orderByColumnName, bool isDesc, SystemApplicationWrapper applicationID, PageQueryParams pageQueryParams) { return(ConvertToWrapperList(businessProxy.FindAllByOrderByAndFilterAndApplicationID(orderByColumnName, isDesc, applicationID.Entity, pageQueryParams))); }
public static void Save(SystemApplicationWrapper obj) { businessProxy.Save(obj.entity); }
public static void Refresh(SystemApplicationWrapper instance) { businessProxy.Refresh(instance.entity); }
public static void Delete(SystemApplicationWrapper instance) { businessProxy.Delete(instance.entity); }
public static List <SystemRoleApplicationWrapper> FindAllByApplicationID(SystemApplicationWrapper applicationID) { return(ConvertToWrapperList(businessProxy.FindAllByApplicationID(applicationID.entity))); }
public static void SaveOrUpdate(SystemApplicationWrapper obj) { businessProxy.SaveOrUpdate(obj.entity); }
public static List <SystemMenuWrapper> GetSystemMenusByApplication(int appID) { return(ConvertToWrapperList(businessProxy.GetMenuByApplication(SystemApplicationWrapper.FindById(appID)))); }
public static List <NavMenu> GetNavMenuByApplication(SystemApplicationWrapper app) { List <SystemMenuWrapper> listmenu = ConvertToWrapperList(businessProxy.GetMenuByApplication(app)); return(GetNavMenusFromSystemMenus(listmenu)); }