/// <summary> /// 创建新的 T_FB_EXTENSIONORDERDETAIL 对象。 /// </summary> /// <param name="eXTENSIONORDERDETAILID">EXTENSIONORDERDETAILID 属性的初始值。</param> /// <param name="aPPLIEDMONEY">APPLIEDMONEY 属性的初始值。</param> /// <param name="cREATEUSERID">CREATEUSERID 属性的初始值。</param> /// <param name="cREATEDATE">CREATEDATE 属性的初始值。</param> /// <param name="uPDATEUSERID">UPDATEUSERID 属性的初始值。</param> /// <param name="uPDATEDATE">UPDATEDATE 属性的初始值。</param> public static T_FB_EXTENSIONORDERDETAIL CreateT_FB_EXTENSIONORDERDETAIL(global::System.String eXTENSIONORDERDETAILID, global::System.Decimal aPPLIEDMONEY, global::System.String cREATEUSERID, global::System.DateTime cREATEDATE, global::System.String uPDATEUSERID, global::System.DateTime uPDATEDATE) { T_FB_EXTENSIONORDERDETAIL t_FB_EXTENSIONORDERDETAIL = new T_FB_EXTENSIONORDERDETAIL(); t_FB_EXTENSIONORDERDETAIL.EXTENSIONORDERDETAILID = eXTENSIONORDERDETAILID; t_FB_EXTENSIONORDERDETAIL.APPLIEDMONEY = aPPLIEDMONEY; t_FB_EXTENSIONORDERDETAIL.CREATEUSERID = cREATEUSERID; t_FB_EXTENSIONORDERDETAIL.CREATEDATE = cREATEDATE; t_FB_EXTENSIONORDERDETAIL.UPDATEUSERID = uPDATEUSERID; t_FB_EXTENSIONORDERDETAIL.UPDATEDATE = uPDATEDATE; return t_FB_EXTENSIONORDERDETAIL; }
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; }
/// <summary> /// 用于向 T_FB_EXTENSIONORDERDETAIL EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToT_FB_EXTENSIONORDERDETAIL(T_FB_EXTENSIONORDERDETAIL t_FB_EXTENSIONORDERDETAIL) { base.AddObject("T_FB_EXTENSIONORDERDETAIL", t_FB_EXTENSIONORDERDETAIL); }