• RookeyFrame 线下 添加Model


    1、在Model层添加一个类,继承BaseEntity,如:

    (将就demo里面的类改了一下)

    using Rookey.BusSys.Model.Base;
    using Rookey.BusSys.Model.EnumSpace;
    using Rookey.Frame.EntityBase;
    using Rookey.Frame.EntityBase.Attr;
    using ServiceStack.DataAnnotations;
    using System;
    
    namespace Rookey.BusSys.Model.Customer
    {
        /// <summary>
        /// 客户联系人2
        /// </summary>
        [ModuleConfig(Name = "客户联系人2", ModuleEditMode = 1, PrimaryKeyFields = "Crm_Cm_CustomerMasterId,Name", TitleKey = "Name", StandardJsFolder = "Customer", Sort = 2)]
        public class Crm_Cm_ContactInfo2 : BaseCustomerEntity
        {
            /// <summary>
            /// 客户信息
            /// </summary>
            [FieldConfig(Display = "客户", ControlType = (int)ControlTypeEnum.TextBox, RowNum = 1, ColNum = 1, IsRequired = true, IsFrozen = true, HeadSort = 1, HeadWidth = 200)]
            public Guid? Crm_Cm_CustomerMasterId { get; set; }
    
    
            /// <summary>
            /// 联系人姓名
            /// </summary>
            [FieldConfig(Display = "联系人姓名", IsRequired = true, IsFrozen = true, RowNum = 1, ColNum = 2, HeadSort = 2, HeadWidth = 80)]
            [StringLength(100)]
            public string Name { get; set; }
    
    
            /// <summary>
            /// 联系人姓名2
            /// </summary>
            [FieldConfig(Display = "联系人姓名2", IsRequired = true, IsFrozen = true, RowNum = 1, ColNum = 2, HeadSort = 2, HeadWidth = 80)]
            [StringLength(100)]
            public string Name2 { get; set; }
        }
    }
    View Code

    2、在Web.config中,在字段RepairTables中,添加表名,如Crm_Cm_ContactInfo2

    3、重新启动项目,此时线下自定义的表,已经添加到了数据库了,在模块管理中可以查看。

     4、添加菜单,刷新一下页面就可以看到这个菜单了,如果刷新后 还是没有显示的话,估计是被缓存了,项目重新打开运行过就行了。

     5、预览功能

  • 相关阅读:
    内核学习<1>
    守护进程(Daemon进程)
    内核模块版本和内核版本不一致的处理方法
    下载,安装 Source Navigator(ubuntu 14.04)
    最新android NDK 下载地址 for Windows
    HTML5初学一 随机的骰子
    系统自带视频
    网络接口log打印
    recyclerView嵌套recycleView
    冒泡循环
  • 原文地址:https://www.cnblogs.com/guxingy/p/10882130.html
Copyright © 2020-2023  润新知