Exemplo n.º 1
0
 /// <summary>
 /// 创建新的 T_FB_DEPTBUDGETSUMMASTER 对象。
 /// </summary>
 /// <param name="dEPTBUDGETSUMMASTERID">DEPTBUDGETSUMMASTERID 属性的初始值。</param>
 /// <param name="bUDGETARYMONTH">BUDGETARYMONTH 属性的初始值。</param>
 /// <param name="eDITSTATES">EDITSTATES 属性的初始值。</param>
 /// <param name="cHECKSTATES">CHECKSTATES 属性的初始值。</param>
 /// <param name="oWNERID">OWNERID 属性的初始值。</param>
 /// <param name="oWNERPOSTID">OWNERPOSTID 属性的初始值。</param>
 /// <param name="oWNERDEPARTMENTID">OWNERDEPARTMENTID 属性的初始值。</param>
 /// <param name="oWNERCOMPANYID">OWNERCOMPANYID 属性的初始值。</param>
 /// <param name="cREATEUSERID">CREATEUSERID 属性的初始值。</param>
 /// <param name="cREATEDATE">CREATEDATE 属性的初始值。</param>
 /// <param name="cREATECOMPANYID">CREATECOMPANYID 属性的初始值。</param>
 /// <param name="cREATEDEPARTMENTID">CREATEDEPARTMENTID 属性的初始值。</param>
 /// <param name="cREATEPOSTID">CREATEPOSTID 属性的初始值。</param>
 /// <param name="uPDATEUSERID">UPDATEUSERID 属性的初始值。</param>
 /// <param name="uPDATEDATE">UPDATEDATE 属性的初始值。</param>
 public static T_FB_DEPTBUDGETSUMMASTER CreateT_FB_DEPTBUDGETSUMMASTER(global::System.String dEPTBUDGETSUMMASTERID, global::System.DateTime bUDGETARYMONTH, global::System.Decimal eDITSTATES, global::System.Decimal cHECKSTATES, global::System.String oWNERID, global::System.String oWNERPOSTID, global::System.String oWNERDEPARTMENTID, global::System.String oWNERCOMPANYID, global::System.String cREATEUSERID, global::System.DateTime cREATEDATE, global::System.String cREATECOMPANYID, global::System.String cREATEDEPARTMENTID, global::System.String cREATEPOSTID, global::System.String uPDATEUSERID, global::System.DateTime uPDATEDATE)
 {
     T_FB_DEPTBUDGETSUMMASTER t_FB_DEPTBUDGETSUMMASTER = new T_FB_DEPTBUDGETSUMMASTER();
     t_FB_DEPTBUDGETSUMMASTER.DEPTBUDGETSUMMASTERID = dEPTBUDGETSUMMASTERID;
     t_FB_DEPTBUDGETSUMMASTER.BUDGETARYMONTH = bUDGETARYMONTH;
     t_FB_DEPTBUDGETSUMMASTER.EDITSTATES = eDITSTATES;
     t_FB_DEPTBUDGETSUMMASTER.CHECKSTATES = cHECKSTATES;
     t_FB_DEPTBUDGETSUMMASTER.OWNERID = oWNERID;
     t_FB_DEPTBUDGETSUMMASTER.OWNERPOSTID = oWNERPOSTID;
     t_FB_DEPTBUDGETSUMMASTER.OWNERDEPARTMENTID = oWNERDEPARTMENTID;
     t_FB_DEPTBUDGETSUMMASTER.OWNERCOMPANYID = oWNERCOMPANYID;
     t_FB_DEPTBUDGETSUMMASTER.CREATEUSERID = cREATEUSERID;
     t_FB_DEPTBUDGETSUMMASTER.CREATEDATE = cREATEDATE;
     t_FB_DEPTBUDGETSUMMASTER.CREATECOMPANYID = cREATECOMPANYID;
     t_FB_DEPTBUDGETSUMMASTER.CREATEDEPARTMENTID = cREATEDEPARTMENTID;
     t_FB_DEPTBUDGETSUMMASTER.CREATEPOSTID = cREATEPOSTID;
     t_FB_DEPTBUDGETSUMMASTER.UPDATEUSERID = uPDATEUSERID;
     t_FB_DEPTBUDGETSUMMASTER.UPDATEDATE = uPDATEDATE;
     return t_FB_DEPTBUDGETSUMMASTER;
 }
Exemplo n.º 2
0
        public FBEntity GetDeptBudgetSumSet(T_FB_DEPTBUDGETSUMDETAIL entity, T_FB_SUMSETTINGSMASTER masterset)
        {
            FBEntity result = null;
            DateTime budgetMonth = entity.T_FB_DEPTBUDGETAPPLYMASTER.BUDGETARYMONTH;
            QueryExpression qe = QueryExpression.Equal(FieldName_BudgetMonth, budgetMonth.ToString("yyyy-MM-dd"));
            QueryExpression qeStates = QueryExpression.Equal(FieldName.CheckStates, ((int)CheckStates.UnSubmit).ToString());
            QueryExpression qeCompany = QueryExpression.Equal(FieldName.OwnerCompanyID, masterset.OWNERCOMPANYID);
           // QueryExpression qeSumsettings = QueryExpression.Equal("SUMSETTINGSMASTERID", masterset.SUMSETTINGSMASTERID).And("PARENTID", entity.T_FB_DEPTBUDGETSUMMASTER.PARENTID);
            qe.RelatedExpression = qeStates;
            qeStates.RelatedExpression = qeCompany;
           // qeCompany.RelatedExpression = qeSumsettings;

            T_FB_DEPTBUDGETSUMMASTER sumMaster = this.InnerGetEntities<T_FB_DEPTBUDGETSUMMASTER>(qe).FirstOrDefault();
            if (sumMaster == null)
            {
                sumMaster = new T_FB_DEPTBUDGETSUMMASTER();
                sumMaster.DEPTBUDGETSUMMASTERID = Guid.NewGuid().ToString();
                sumMaster.DEPTBUDGETSUMMASTERCODE = "自动生成";
                sumMaster.CREATEUSERID = SYSTEM_USER_ID;
                sumMaster.CREATEUSERNAME = "******";
                sumMaster.CREATEDATE = System.DateTime.Now;
                sumMaster.UPDATEUSERID = SYSTEM_USER_ID;
                sumMaster.UPDATEDATE = System.DateTime.Now;
                sumMaster.BUDGETARYMONTH = budgetMonth;

                sumMaster.CREATECOMPANYID = SYSTEM_USER_ID;
                sumMaster.CREATECOMPANYNAME = "系统生成";
                sumMaster.CREATEDEPARTMENTID = SYSTEM_USER_ID;
                sumMaster.CREATEDEPARTMENTNAME = "系统生成";
                sumMaster.CREATEPOSTID = SYSTEM_USER_ID;
                sumMaster.CREATEPOSTNAME = "系统生成";

                sumMaster.OWNERCOMPANYID = masterset.OWNERCOMPANYID;
                sumMaster.OWNERCOMPANYNAME = masterset.OWNERCOMPANYNAME;

                sumMaster.OWNERDEPARTMENTID = masterset.OWNERDEPARTMENTID;
                sumMaster.OWNERDEPARTMENTNAME = masterset.OWNERDEPARTMENTNAME;

                sumMaster.OWNERPOSTID = masterset.OWNERPOSTID;
                sumMaster.OWNERPOSTNAME = masterset.OWNERPOSTNAME;

                sumMaster.OWNERID = masterset.OWNERID;
                sumMaster.OWNERNAME = masterset.OWNERNAME;

                sumMaster.SUMSETTINGSMASTERID = masterset.SUMSETTINGSMASTERID;
                sumMaster.SUMLEVEL = 1; //0:代表当前汇总单不走自定义汇总流程;1:代表当前汇总单走自定义汇总流程
               
                sumMaster.CHECKSTATES = (int)CheckStates.UnSubmit;
                sumMaster.EDITSTATES = (int)EditStates.Actived;
                result = sumMaster.ToFBEntity();
                result.FBEntityState = FBEntityState.Added;
            }
            else
            {
                result = sumMaster.ToFBEntity();
                result.FBEntityState = FBEntityState.Modified;
            }
            return result;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 用于向 T_FB_DEPTBUDGETSUMMASTER EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToT_FB_DEPTBUDGETSUMMASTER(T_FB_DEPTBUDGETSUMMASTER t_FB_DEPTBUDGETSUMMASTER)
 {
     base.AddObject("T_FB_DEPTBUDGETSUMMASTER", t_FB_DEPTBUDGETSUMMASTER);
 }