Esempio n. 1
0
 /// <summary>
 /// 加入子级
 /// </summary>
 /// <param name="propertyConfig"></param>
 public void Add(UserCommandConfig propertyConfig)
 {
     if (!Commands.Contains(propertyConfig))
     {
         propertyConfig.Parent = this;
         Commands.Add(propertyConfig);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="cfg"></param>
        /// <returns></returns>
        public void CopyFrom(EntityConfig cfg)
        {
            base.CopyFrom(cfg);

            foreach (var item in cfg.Properties.Where(p => !p.IsDelete && !p.IsDiscard))//字段列表
            {
                var child = new PropertyConfig();
                child.Copy(WorkContext.InCoderGenerating ? item.Option.LastConfig : item);
                Add(child);
            }
            DenyScope          = cfg.DenyScope;          //阻止编辑
            MaxIdentity        = cfg.MaxIdentity;        //最大字段标识号
            RedisKey           = cfg.RedisKey;           //Redis唯一键模板
            NoStandardDataType = cfg.NoStandardDataType; //非标准数据类型
            EntityName         = cfg.EntityName;         //实体名称
            ReferenceType      = cfg.ReferenceType;      //参考类型(C#)
            ModelInclude       = cfg.ModelInclude;       //模型
            ModelBase          = cfg.ModelBase;          //基类
            DataVersion        = cfg.DataVersion;        //数据版本
            IsInternal         = cfg.IsInternal;         //内部数据
            NoDataBase         = cfg.NoDataBase;         //无数据库支持
            Interfaces         = cfg.Interfaces;         //继承的接口集合
            foreach (var item in cfg.Releations)         //字段
            {
                var child = new EntityReleationConfig();
                child.Copy(item);
                Add(child);
            }
            ColumnIndexStart = cfg.ColumnIndexStart; //列序号起始值
            ReadCoreCodes    = cfg.ReadCoreCodes;    //不同版本读数据的代码
            IsInterface      = cfg.IsInterface;      //接口定义
            foreach (var item in cfg.Commands)       //命令集合
            {
                var child = new UserCommandConfig();
                child.Copy(item);
                Add(child);
            }
            ReadTableName    = cfg.ReadTableName;    //存储表名(设计录入)
            SaveTableName    = cfg.SaveTableName;    //存储表名
            DbIndex          = cfg.DbIndex;          //数据库编号
            UpdateByModified = cfg.UpdateByModified; //按修改更新
            PageFolder       = cfg.PageFolder;       //页面文件夹名称
            TreeUi           = cfg.TreeUi;           //树形界面
            MaxForm          = cfg.MaxForm;          //编辑页面最大化
            FormCloumn       = cfg.FormCloumn;       //编辑页面分几列
            ListDetails      = cfg.ListDetails;      //列表详细页
            NoSort           = cfg.NoSort;           //主键正序
            PanelType        = cfg.PanelType;        //主页面类型
            CppName          = cfg.CppName;          //C++名称
        }
Esempio n. 3
0
 /// <summary>
 /// 加入子级
 /// </summary>
 /// <param name="propertyConfig"></param>
 public void Remove(UserCommandConfig propertyConfig)
 {
     Commands.Remove(propertyConfig);
 }