private List <SysEnumNameEntity> SetSysEnumNameListCache() { var list = EntityExecution.SelectAll <SysEnumNameEntity>(); DataCache.SetCache(CacheKey, list); return(list); }
public List <SysMenuEntity> GetSysMenuListByFatherNode(int fatherNode = 0) { List <SysMenuEntity> list = EntityExecution.SelectAll <SysMenuEntity>(n => n.DeleteFlag == false && n.FatherNode == fatherNode); list = list.OrderBy(n => n.Seq).ToList(); return(list); }
public List <FoodTypeEntity> GetFoodTypeEntityList(FoodTypeEntity condition_entity) { GenericWhereEntity <FoodTypeEntity> where_entity = new GenericWhereEntity <FoodTypeEntity>(); if (condition_entity.FOOD_TYPE_ID != null) { where_entity.Where(n => (n.FOOD_TYPE_ID == condition_entity.FOOD_TYPE_ID)); } if (condition_entity.FOOD_TYPE_NAME != null) { where_entity.Where(n => (n.FOOD_TYPE_NAME == condition_entity.FOOD_TYPE_NAME)); } return(EntityExecution.SelectAll(where_entity)); }
public List <FoodEntity> GetFoodEntityList(FoodEntity condition_entity) { GenericWhereEntity <FoodEntity> where_entity = new GenericWhereEntity <FoodEntity>(); if (condition_entity.FOOD_ID != null) { where_entity.Where(n => (n.FOOD_ID == condition_entity.FOOD_ID)); } if (condition_entity.RESTAURANT_ID != null) { where_entity.Where(n => (n.RESTAURANT_ID == condition_entity.RESTAURANT_ID)); } return(EntityExecution.SelectAll(where_entity)); }
public List <EmployeeEntity> GetEmployeeEntityList(EmployeeEntity condition_entity) { GenericWhereEntity <EmployeeEntity> where_entity = new GenericWhereEntity <EmployeeEntity>(); if (condition_entity.EMPLOYEE_ID != null) { where_entity.Where(n => (n.EMPLOYEE_ID == condition_entity.EMPLOYEE_ID)); } if (!string.IsNullOrEmpty(condition_entity.PASSWORD)) { where_entity.Where(n => (n.PASSWORD == condition_entity.PASSWORD)); } return(EntityExecution.SelectAll(where_entity)); }
public List <RestaurantEntity> GetRestaurantEntityList(RestaurantEntity condition_entity) { GenericWhereEntity <RestaurantEntity> where_entity = new GenericWhereEntity <RestaurantEntity>(); if (condition_entity.RESTAURANT_ID != null) { where_entity.Where(n => (n.RESTAURANT_ID == condition_entity.RESTAURANT_ID)); } if (condition_entity.RESTAURANT_NAME != null) { where_entity.Where(n => (n.RESTAURANT_NAME == condition_entity.RESTAURANT_NAME)); } return(EntityExecution.SelectAll(where_entity)); }
private List <SysRelationEntity> SetSysRelationListCache() { var listSysRelationEntity = EntityExecution.SelectAll <SysRelationEntity>(); var listSysModuleEnumEntity = new SysModuleEnumBiz().GetSysModuleEnumList(); var listSysFuncPointEnumEntity = new SysFuncPointEnumBiz().GetSysFuncPointEnumList(); var query = from sysRelationEntity in listSysRelationEntity join sysModuleEnumEntity in listSysModuleEnumEntity on sysRelationEntity.ModuleId equals sysModuleEnumEntity.Name join sysFuncPointEnumEntity in listSysFuncPointEnumEntity on sysRelationEntity.FuncPointId equals sysFuncPointEnumEntity.Name select new SysRelationEntity() { ModuleId = sysRelationEntity.ModuleId, FuncPointId = sysRelationEntity.FuncPointId, Permissions = sysRelationEntity.Permissions, ModuleName = sysModuleEnumEntity.Description, FuncPointName = sysFuncPointEnumEntity.Description, }; listSysRelationEntity = query.ToList <SysRelationEntity>(); foreach (SysRelationEntity sysRelationEntity in listSysRelationEntity) { if (!string.IsNullOrEmpty(sysRelationEntity.Permissions)) { sysRelationEntity.PermissionList = new List <string>(); sysRelationEntity.PermissionListName = new List <string>(); var list = sysRelationEntity.Permissions.Split(',').ToList(); foreach (string s in list) { if (!string.IsNullOrEmpty(s)) { sysRelationEntity.PermissionList.Add(s); sysRelationEntity.PermissionListName.Add(SysEnumNameExBiz.GetDescription <SysFuncPointEnum>(s)); } } if (sysRelationEntity.PermissionListName.Count > 0) { sysRelationEntity.PermissionsName = string.Join(",", sysRelationEntity.PermissionListName.ToArray()); } } } DataCache.SetCache(CacheKey, listSysRelationEntity); return(listSysRelationEntity); }
public List <OrderListEntity> GetOrderListEntityList(OrderListEntity condition_entity) { GenericWhereEntity <OrderListEntity> where_entity = new GenericWhereEntity <OrderListEntity>(); if (condition_entity.LIST_ID != null) { where_entity.Where(n => (n.LIST_ID == condition_entity.LIST_ID)); } if (condition_entity.ORDER_ID != null) { where_entity.Where(n => (n.ORDER_ID == condition_entity.ORDER_ID)); } if (condition_entity.FOOD_ID != null) { where_entity.Where(n => (n.FOOD_ID == condition_entity.FOOD_ID)); } return(EntityExecution.SelectAll(where_entity)); }
private List <SysPageFuncPointEntity> SetSysPageFuncPointListCache() { var listSysPageFuncPointEntity = EntityExecution.SelectAll <SysPageFuncPointEntity>().OrderBy(n => n.PageUrl); var listSysFuncPointEnumEntity = new SysFuncPointEnumBiz().GetSysFuncPointEnumList(); var query = from sysPageFuncPointEntity in listSysPageFuncPointEntity join sysFuncPointEnumEntity in listSysFuncPointEnumEntity on sysPageFuncPointEntity.FuncPointId equals sysFuncPointEnumEntity.Name select new SysPageFuncPointEntity() { PageUrl = sysPageFuncPointEntity.PageUrl, FuncPointId = sysPageFuncPointEntity.FuncPointId, FuncPointName = sysFuncPointEnumEntity.Description, }; var list = query.ToList <SysPageFuncPointEntity>(); DataCache.SetCache(CacheKey, list); return(list); }
public List <OrderMainEntity> GetOrderMainEntityList(OrderMainEntity condition_entity) { GenericWhereEntity <OrderMainEntity> where_entity = new GenericWhereEntity <OrderMainEntity>(); if (condition_entity.ORDER_ID != null) { where_entity.Where(n => (n.ORDER_ID == condition_entity.ORDER_ID)); } if (condition_entity.RESTAURANT_ID != null) { where_entity.Where(n => (n.RESTAURANT_ID == condition_entity.RESTAURANT_ID)); } if (condition_entity.TABLE_ID != null) { where_entity.Where(n => (n.TABLE_ID == condition_entity.TABLE_ID)); } if (condition_entity.ORDER_FLAG != null) { where_entity.Where(n => (n.ORDER_FLAG == condition_entity.ORDER_FLAG)); } return(EntityExecution.SelectAll(where_entity)); }
public List <CuContactPersonEntity> GetCuContactPersonList(string cuId) { return(EntityExecution.SelectAll <CuContactPersonEntity>(n => n.CuId == cuId && n.DeleteFlag == false)); }
public List <CuContactPersonEntity> GetCuContactPersonList() { return(EntityExecution.SelectAll <CuContactPersonEntity>(n => n.DeleteFlag == false)); }
public List <BcLogErrorEntity> GetBcLogErrorList() { return(EntityExecution.SelectAll <BcLogErrorEntity>().OrderByDescending(n => n.OpTime).ToList()); }
public List <BcRoleEntity> GetBcRoleList() { return(EntityExecution.SelectAll <BcRoleEntity>()); }
/// <summary> /// /// </summary> /// <param name="permissionType">1=角色权限,2=用户权限</param> /// <param name="userRoleId"></param> public List <BcPermissionEntity> GetEnabledBcPermissionList(int?permissionType, int?userRoleId = 0) { //获取可用的权限列表 var allBcPermissionList = EntityExecution.SelectAll <BcPermissionEntity>(); var enabledBcPermissionList = new List <BcPermissionEntity>(); if (userRoleId == 0) { enabledBcPermissionList.AddRange(allBcPermissionList.Where(n => n.PermissionType == permissionType)); } else { enabledBcPermissionList.AddRange(allBcPermissionList.Where(n => n.UserRoleId == userRoleId && n.PermissionType == permissionType)); } //加载可用的菜单列表 var listEnabledSysMenuEntity = new SysMenuBiz().GetEnabledSysMenuList(); //根据可用的菜单列表,去掉没有起到作用的功能点 for (int i = enabledBcPermissionList.Count - 1; i >= 0; i--) { var permisionEntity = enabledBcPermissionList[i]; var list = listEnabledSysMenuEntity.Where( n => n.ModuleId == permisionEntity.ModuleId && n.FuncPointId == permisionEntity.FuncPointId) .ToList(); if (list.Count <= 0) { enabledBcPermissionList.Remove(permisionEntity); } } //补充所有id的name var allBcRoleList = new BcRoleBiz().GetBcRoleList(); var allBcUserInfoList = new BcUserInfoBiz().GetBcUserInfoList(); foreach (BcPermissionEntity bcPermissionEntity in enabledBcPermissionList) { bcPermissionEntity.ModuleName = SysEnumNameExBiz.GetDescription <SysModuleEnum>(bcPermissionEntity.ModuleId); bcPermissionEntity.FuncPointName = SysEnumNameExBiz.GetDescription <SysFuncPointEnum>(bcPermissionEntity.FuncPointId); if (permissionType == 1) { var list = allBcRoleList.Where(n => n.RoleId == bcPermissionEntity.UserRoleId).ToList(); if (list.Count > 0) { bcPermissionEntity.UserRoleName = list[0].RoleName; } } else if (permissionType == 2) { var list = allBcUserInfoList.Where(n => n.UserId == bcPermissionEntity.UserRoleId).ToList(); if (list.Count > 0) { bcPermissionEntity.UserRoleName = list[0].UserName; } } if (!string.IsNullOrEmpty(bcPermissionEntity.Permissions)) { bcPermissionEntity.PermissionList = new List <string>(); bcPermissionEntity.PermissionNameList = new List <string>(); var list = bcPermissionEntity.Permissions.Split(',').ToList(); foreach (string s in list) { if (!string.IsNullOrEmpty(s)) { bcPermissionEntity.PermissionList.Add(s); bcPermissionEntity.PermissionNameList.Add( SysEnumNameExBiz.GetDescription <SysFuncPointEnum>(s)); } } if (bcPermissionEntity.PermissionNameList.Count > 0) { bcPermissionEntity.PermissionNames = string.Join(",", bcPermissionEntity.PermissionNameList.ToArray()); } } } return (enabledBcPermissionList.OrderBy(n => n.UserRoleId) .ThenBy(n => n.ModuleId) .ThenBy(n => n.FuncPointId) .ToList()); }
public List <CuCustomerEntity> GetCuCustomerList() { return(EntityExecution.SelectAll <CuCustomerEntity>(n => n.DeleteFlag == false)); }
public List <BcUserInfoEntity> GetEnabledBcUserInfoList() { return(EntityExecution.SelectAll <BcUserInfoEntity>(n => n.DeleteFlag == false && n.ActivityFlag == true)); }
public List <BcGroupEntity> GetBcGroupList() { return(EntityExecution.SelectAll <BcGroupEntity>()); }
public List <BcAutoCodeEntity> GetBcAutoCodeList() { return(EntityExecution.SelectAll <BcAutoCodeEntity>()); }