///// <summary>
        ///// 生成业务层记录
        ///// </summary>
        ///// <returns></returns>
        //public MyResponseBase Design_ModularOrFunDomain_BulidRecord()
        //{
        //    var Design_ModularOrFunID = Item.Design_ModularOrFunID;
        //    Design_ModularOrFunDomain_Domain();
        //    SoftProjectAreaEntity hOperControl = new SoftProjectAreaEntity { };
        //    #region 功能模块对象
        //    var Design_ModularOrFun = Design_ModularOrFun_GetByID().Item;
        //    #endregion
        //    #region 获取实体字段
        //    var Design_ModularFields = Design_ModularField_GetByModularOrFunID().Items;
        //    //var FKFieldss = Design_ModularFields.Where(p => p.bPrimaryKeyOrFK != null && ((int)p.bPrimaryKeyOrFK & 2) == 2).First();
        //    //var FKFields = string.Join(",", FKFieldss);//deleteForecastIDsEnum.ToArray()
        //    var PKFields = Design_ModularFields.Where(p => p.bPrimaryKeyOrFK != null && ((int)p.bPrimaryKeyOrFK & 1) == 1).Select(p => p.name).ToList();
        //    var PKField = string.Join(",", PKFields);//deleteForecastIDsEnum.ToArray()
        //    #endregion
        //    #region 构造函数
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = "构造函数",
        //        MethodName = "Domain",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 1,
        //    };
        //    //var resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = "构造函数",
        //        //Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 1,
        //        ParamName = "",
        //        DBOperCode = "",
        //        Serial = 1,
        //    });
        //    Design_ModularOrFunDomain_AddSave();
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    #endregion
        //    #region 主键不能为空
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = "主键不为空检查",
        //        MethodName = "PKCheck",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 6,
        //    };
        //    //            resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = "主键不为空检查",
        //        Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 2,
        //        ParamName = "",
        //        DBOperCode = "",
        //        Serial = 1,
        //    });
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    Design_ModularOrFunDomain_AddSave();
        //    #endregion
        //    #region 根据主键查询--显示
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = "根据主键查询--显示",
        //        MethodName = "ByID",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 11,
        //    };
        //    //resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = "根据主键查询--显示",
        //        Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 13,
        //        ParamName = "",
        //        DBOperCode = Design_ModularOrFun.ControllCode + ".ByID",
        //        Serial = 1,
        //    });
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    Design_ModularOrFunDomain_AddSave();
        //    #endregion
        //    #region 根据主键查询--编辑
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = "根据主键查询--编辑",
        //        MethodName = "ByIDEdit",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 11,
        //    };
        //    //resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = "根据主键查询--编辑",
        //        Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 14,
        //        ParamName = "",
        //        DBOperCode = "",
        //        Serial = 1,
        //    });
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    Design_ModularOrFunDomain_AddSave();
        //    #endregion
        //    #region 列表查询
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = string.Format("列表查询"),
        //        MethodName = "Index",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 11,
        //    };
        //    //resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = string.Format("列表查询"),
        //        Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 11,
        //        ParamName = "",
        //        DBOperCode = Design_ModularOrFun.ControllCode + ".Index",
        //        Serial = 1,
        //    });
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    Design_ModularOrFunDomain_AddSave();
        //    #endregion
        //    //#region 添加查询
        //    ////主表
        //    //Item = new SoftProjectAreaEntity
        //    //{
        //    //    ModularOrFunDomainDetailName = string.Format("添加查询--根据{0}初始化", FKFieldss.NameCn),
        //    //    MethodName = "Add",
        //    //    Design_ModularOrFunID = Design_ModularOrFunID,
        //    //    Sort = 31,
        //    //};
        //    //resp = Design_ModularOrFunDomain_Add();
        //    ////明细表
        //    //Item = resp.Item;
        //    //Item.Items.Add(new SoftProjectAreaEntity
        //    //{
        //    //    ModularOrFunDomainDetailName = string.Format("添加查询--根据{0}初始化", FKFieldss.NameCn),
        //    //    Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //    //    DomainType = 22,
        //    //    ParamName = FKFieldss.name,
        //    //    DBOperCode = "",
        //    //    Serial = 1,
        //    //});
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    //#endregion
        //    #region 添加保存
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = string.Format("添加保存"),
        //        MethodName = "AddSave",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 31,
        //    };
        //    //resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = string.Format("添加保存"),
        //        Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 23,
        //        ParamName = "",
        //        DBOperCode = Design_ModularOrFun.ControllCode + ".AddSave",
        //        Serial = 1,
        //    });
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    Design_ModularOrFunDomain_AddSave();
        //    #endregion
        //    #region 编辑保存
        //    //主表
        //    Item = new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainName = string.Format("编辑保存"),
        //        MethodName = "EditSave",
        //        Design_ModularOrFunID = Design_ModularOrFunID,
        //        Sort = 31,
        //    };
        //    //resp = Design_ModularOrFunDomain_AddSave();
        //    //明细表
        //    //Item = resp.Item;
        //    Item.Items.Add(new SoftProjectAreaEntity
        //    {
        //        ModularOrFunDomainDetailName = string.Format("编辑保存"),
        //        Design_ModularOrFunDomainID = resp.Item.Design_ModularOrFunDomainID,
        //        DomainType = 26,
        //        ParamName = "",
        //        DBOperCode = Design_ModularOrFun.ControllCode + ".EditSave",
        //        Serial = 1,
        //    });
        //    //Design_ModularOrFunDomainDetail_EditSave();
        //    Design_ModularOrFunDomain_AddSave();
        //    #endregion
        //    return resp;
        //}
        /// <summary>
        /// 生成业务层记录
        /// </summary>
        /// <returns></returns>
        public MyResponseBase Design_ModularOrFunDomain_BulidRecord()
        {
            var Design_ModularOrFunID = Item.Design_ModularOrFunID;

            #region
            //构造函数
            SoftProjectAreaEntityDomain domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 1, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            //主键不为空
            domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 2, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            //根据主键查询--显示
            domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 11, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            //根据主键查询--编辑
            domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 13, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            //列表查询
            domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 14, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            //添加保存
            domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 23, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            //编辑保存
            domain = new SoftProjectAreaEntityDomain();
            domain.Item = new SoftProjectAreaEntity { DomainTypeTemp = 26, Design_ModularOrFunID = Design_ModularOrFunID };
            domain.Design_ModularOrFunDomain_AddSaveMethod();

            #endregion

            return resp;
        }
 public HJsonResult AddSaveMethod(SoftProjectAreaEntityDomain domain)
 {
     var resp = domain.Design_ModularOrFunDomain_AddSaveMethod();
     return new HJsonResult(new { Data = resp });
 }