/// <summary> /// 获取整个模块可用的的所有功能列表 /// </summary> /// <param name="boType"></param> /// <returns></returns> private OperationACList GetByModule(ModuleAC module) { var moduleScopeTranslated = OperationAC.ModuleScope.Translate(); var list = new OperationACList(); var m = module.Core; foreach (var op in m.CustomOpertions) { list.Add(new OperationAC { ScopeKeyLabel = moduleScopeTranslated, OperationKey = op.Name, Label = op.Label.Translate() }); } //模块的查看功能 list.Add(new OperationAC { ScopeKeyLabel = moduleScopeTranslated, OperationKey = SystemOperationKeys.Read, Label = SystemOperationKeys.Read.Translate(), }); //系统生成的界面,迭归生成功能列表 if (!m.IsCustomUI) { var blocks = UIModel.AggtBlocks.GetModuleBlocks(m); this.GetByBlocksRecur(blocks, list); } return(list); }
private ModuleAC AddItemRecur(IList <Entity> list, ModuleMeta module) { var item = new ModuleAC(); item.Core = module; //这句会生成 Id。 item.Id = RafyEnvironment.NewLocalId(); list.Add(item); foreach (var child in module.Children) { var childModule = this.AddItemRecur(list, child); childModule.TreeParent = item; } item.PersistenceStatus = PersistenceStatus.Unchanged; return(item); }
public void Insert(int index, ModuleAC entity) { base.Insert(index, entity); }
public int IndexOf(ModuleAC entity) { return(base.IndexOf(entity)); }
public bool Contains(ModuleAC entity) { return(base.Contains(entity)); }
public void Add(ModuleAC entity) { base.Add(entity); }
public bool Remove(ModuleAC entity) { return(base.Remove(entity)); }