public PagedList <Domain.SystemForm> QueryPaged(Func <QueryDescriptor <Domain.SystemForm>, QueryDescriptor <Domain.SystemForm> > container, Guid solutionId, bool existInSolution, FormType formType) { QueryDescriptor <Domain.SystemForm> q = container(QueryDescriptorBuilder.Build <Domain.SystemForm>()); var datas = _systemFormRepository.QueryPaged(q, ModuleCollection.GetIdentity(formType == FormType.Dashboard ? DashBoardDefaults.ModuleName : FormDefaults.ModuleName), solutionId, existInSolution); WrapLocalizedLabel(datas.Items); return(datas); }
public PagedList <WorkFlow> QueryPaged(Func <QueryDescriptor <WorkFlow>, QueryDescriptor <WorkFlow> > container, Guid solutionId, bool existInSolution) { QueryDescriptor <WorkFlow> q = container(QueryDescriptorBuilder.Build <WorkFlow>()); var datas = _workFlowRepository.QueryPaged(q, ModuleCollection.GetIdentity(WorkFlowDefaults.ModuleName), solutionId, existInSolution); WrapLocalizedLabel(datas.Items); return(datas); }
public PagedList <Domain.OptionSet> QueryPaged(Func <QueryDescriptor <Domain.OptionSet>, QueryDescriptor <Domain.OptionSet> > container, Guid solutionId, bool existInSolution) { QueryDescriptor <Domain.OptionSet> q = container(QueryDescriptorBuilder.Build <Domain.OptionSet>()); var datas = _optionSetRepository.QueryPaged(q, ModuleCollection.GetIdentity(OptionSetDefaults.ModuleName), solutionId, existInSolution); WrapLocalizedLabel(datas.Items); return(datas); }
public PagedList <SolutionComponent> QueryPaged(int page, int pageSize, Guid solutionId, string componentTypeName) { var identity = ModuleCollection.GetIdentity(componentTypeName); var q = QueryDescriptorBuilder.Build <SolutionComponent>(); q.Where(x => x.SolutionId == solutionId && x.ComponentType == identity); q.Page(page, pageSize); return(_solutionComponentRepository.QueryPaged(q)); }
public bool CreateMany(string objectTypeName, Guid objectId, params Guid[] roleId) { Guard.NotEmpty(roleId, nameof(roleId)); List <RoleObjectAccess> accessList = new List <RoleObjectAccess>(); foreach (var rid in roleId) { var ar = new RoleObjectAccess { ObjectId = objectId, ObjectTypeCode = ModuleCollection.GetIdentity(objectTypeName), RoleId = rid }; accessList.Add(ar); } return(_roleObjectAccessRepository.CreateMany(accessList)); }
public virtual ILocalizedLabelBatchBuilder Append(Guid solutionId, string label, string labelTypeName, string columnName, Guid objectId) { var entity = new LocalizedLabel { ComponentState = 0, SolutionId = solutionId, Label = label, LabelTypeCode = ModuleCollection.GetIdentity(labelTypeName), LanguageId = _appContext.GetFeature <Xms.Organization.Domain.Organization>().LanguageId, ObjectColumnName = columnName, ObjectId = objectId, LocalizedLabelId = Guid.NewGuid() }; _entities.Add(entity); return(this); }
public bool Create(Guid solutionId, string label, string labelTypeName, string columnName, Guid objectId, LanguageCode languageId) { if (label.IsEmpty()) { return(false); } return(_localizedLabelRepository.Create(new LocalizedLabel() { ComponentState = 0 , SolutionId = solutionId , Label = label , LabelTypeCode = ModuleCollection.GetIdentity(labelTypeName) , LanguageId = languageId , ObjectColumnName = columnName , ObjectId = objectId })); }
/// <summary> /// 获取用户菜单权限 /// </summary> /// <param name="userId"></param> /// <param name="areaName"></param> /// <param name="className"></param> /// <param name="methodName"></param> /// <returns></returns> public Privilege GetAuthPrivilege(Guid systemUserId, string areaName, string className, string methodName) { return(_systemUserPermissionRepository.GetAuthPrivilege(systemUserId, areaName, className, methodName, ModuleCollection.GetIdentity(SiteMapDefaults.ModuleName))); }
public bool Exists(Guid objectId, string objectTypeName, params Guid[] roleId) { return(this.Exists(objectId, ModuleCollection.GetIdentity(objectTypeName), roleId)); }
public List <RoleObjectAccess> QueryRolePermissions(Guid roleId, string objectTypeName) { return(_roleObjectAccessRepository.Query(x => x.RoleId == roleId && x.ObjectTypeCode == ModuleCollection.GetIdentity(objectTypeName))?.ToList()); }
public bool DeleteByRole(Guid roleId, string objectTypeName) { return(this.DeleteByRole(roleId, ModuleCollection.GetIdentity(objectTypeName))); }
public bool DeleteByObjectId(string objectTypeName, params Guid[] objectId) { return(this.DeleteByObjectId(ModuleCollection.GetIdentity(objectTypeName), objectId)); }
public bool DeleteObject(Guid solutionid, string componentName, params Guid[] objectid) { return(this.DeleteObject(solutionid, ModuleCollection.GetIdentity(componentName), objectid)); }
public List <Guid> GetNoneEditFields(Guid systemUserId, List <Guid> securityFields) { return(_systemUserPermissionRepository.GetNoneEditFields(systemUserId, securityFields, ModuleCollection.GetIdentity(AttributeDefaults.ModuleName))); }
public bool Update(string dependentComponentName, Guid dependentObjectId, string requiredComponentName, params Guid[] requiredObjectId) { return(this.Update(ModuleCollection.GetIdentity(dependentComponentName), dependentObjectId, ModuleCollection.GetIdentity(requiredComponentName), requiredObjectId)); }
public List <SolutionComponent> Query(Guid solutionId, string componentTypeName) { var identity = ModuleCollection.GetIdentity(componentTypeName); return(_solutionComponentRepository.Query(x => x.SolutionId == solutionId && x.ComponentType == identity)?.ToList()); }
/// <summary> /// 检测并抛出异常(如果存在依赖) /// </summary> /// <typeparam name="TRequired">被依赖对象类型</typeparam> /// <param name="requiredComponentName">被依赖组件类型</param> /// <param name="requiredId">被依赖对象主键</param> public void CheckAndThrow <TRequired>(string requiredComponentName, Guid requiredId) { this.CheckAndThrow <TRequired>(ModuleCollection.GetIdentity(requiredComponentName), requiredId); }
public virtual DependencyBatchBuilder Append(string dependentComponentName, Guid dependentObjectId, string requiredComponentName, params Guid[] requiredObjectId) { return(this.Append(ModuleCollection.GetIdentity(dependentComponentName), dependentObjectId, ModuleCollection.GetIdentity(requiredComponentName), requiredObjectId)); }
public bool Create(Guid solutionId, Guid objectId, string componentName) { return(this.Create(solutionId, objectId, ModuleCollection.GetIdentity(componentName))); }
public Privilege GetAuthPrivilege(Guid systemUserId, string url) { return(_systemUserPermissionRepository.GetAuthPrivilege(systemUserId, url, ModuleCollection.GetIdentity(SiteMapDefaults.ModuleName))); }
public bool DeleteByRequiredId(string requiredComponentName, params Guid[] requiredId) { return(this.DeleteByRequiredId(ModuleCollection.GetIdentity(requiredComponentName), requiredId)); }