Пример #1
0
 /// <summary>
 /// 创建新的 T_FB_EXTENSIONALORDER 对象。
 /// </summary>
 /// <param name="eXTENSIONALORDERID">EXTENSIONALORDERID 属性的初始值。</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_EXTENSIONALORDER CreateT_FB_EXTENSIONALORDER(global::System.String eXTENSIONALORDERID, 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_EXTENSIONALORDER t_FB_EXTENSIONALORDER = new T_FB_EXTENSIONALORDER();
     t_FB_EXTENSIONALORDER.EXTENSIONALORDERID = eXTENSIONALORDERID;
     t_FB_EXTENSIONALORDER.CHECKSTATES = cHECKSTATES;
     t_FB_EXTENSIONALORDER.OWNERID = oWNERID;
     t_FB_EXTENSIONALORDER.OWNERPOSTID = oWNERPOSTID;
     t_FB_EXTENSIONALORDER.OWNERDEPARTMENTID = oWNERDEPARTMENTID;
     t_FB_EXTENSIONALORDER.OWNERCOMPANYID = oWNERCOMPANYID;
     t_FB_EXTENSIONALORDER.CREATEUSERID = cREATEUSERID;
     t_FB_EXTENSIONALORDER.CREATEDATE = cREATEDATE;
     t_FB_EXTENSIONALORDER.CREATECOMPANYID = cREATECOMPANYID;
     t_FB_EXTENSIONALORDER.CREATEDEPARTMENTID = cREATEDEPARTMENTID;
     t_FB_EXTENSIONALORDER.CREATEPOSTID = cREATEPOSTID;
     t_FB_EXTENSIONALORDER.UPDATEUSERID = uPDATEUSERID;
     t_FB_EXTENSIONALORDER.UPDATEDATE = uPDATEDATE;
     return t_FB_EXTENSIONALORDER;
 }
Пример #2
0
        public FBEntity ReSubmitT_FB_EXTENSIONALORDER(T_FB_EXTENSIONALORDER entity)
        {
            FBEntityBLL bll = this;
            FBEntity fbOldEntity = GetFBEntityByEntityKey(entity.EntityKey);


            var master = fbOldEntity.Entity as T_FB_EXTENSIONALORDER;
            var details = fbOldEntity.GetRelationFBEntities(typeof(T_FB_EXTENSIONORDERDETAIL).Name);
            details.ForEach(item =>
            {
                bll.InnerRemove(item.Entity);
            });

            master.INNERORDERID = string.Empty;
            master.CHECKSTATES = (int)CheckStates.Approving;
            master.TOTALMONEY = entity.TOTALMONEY;

            var result = master.ToFBEntity();
            List<FBEntity> listDetail = entity.T_FB_EXTENSIONORDERDETAIL.ToList().CreateList(item =>
                {
                    T_FB_EXTENSIONORDERDETAIL detail = new T_FB_EXTENSIONORDERDETAIL();
                    detail.EXTENSIONORDERDETAILID = Guid.NewGuid().ToString();

                    detail.APPLIEDMONEY = item.APPLIEDMONEY;
                    detail.CHARGETYPE = item.CHARGETYPE;
                    detail.CREATEDATE = DateTime.Now;
                    detail.CREATEUSERID = item.CREATEUSERID;
                    detail.REMARK = item.REMARK;
                    detail.T_FB_SUBJECT = item.T_FB_SUBJECT;
                    detail.UPDATEUSERID = item.UPDATEUSERID;
                    detail.USABLEMONEY = item.USABLEMONEY;
                    detail.T_FB_EXTENSIONALORDER = entity;

                    FBEntity fbEntityDetail = detail.ToFBEntity();
                    fbEntityDetail.FBEntityState = FBEntityState.Added;
                    return fbEntityDetail;
                });
            result.AddFBEntities<T_FB_EXTENSIONORDERDETAIL>(listDetail);

            result.FBEntityState = FBEntityState.ReSubmit;
            SaveT_FB_EXTENSIONALORDER(result);
            return result;

        }
Пример #3
0
 /// <summary>
 /// 用于向 T_FB_EXTENSIONALORDER EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToT_FB_EXTENSIONALORDER(T_FB_EXTENSIONALORDER t_FB_EXTENSIONALORDER)
 {
     base.AddObject("T_FB_EXTENSIONALORDER", t_FB_EXTENSIONALORDER);
 }