Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void Insert(int index, ModuleAC entity)
 {
     base.Insert(index, entity);
 }
Esempio n. 4
0
 public int IndexOf(ModuleAC entity)
 {
     return(base.IndexOf(entity));
 }
Esempio n. 5
0
 public bool Contains(ModuleAC entity)
 {
     return(base.Contains(entity));
 }
Esempio n. 6
0
 public void Add(ModuleAC entity)
 {
     base.Add(entity);
 }
Esempio n. 7
0
 public bool Remove(ModuleAC entity)
 {
     return(base.Remove(entity));
 }