示例#1
0
 public MaterialPurchasDtlBase()
 {
     this.inTxn = false;
     this._materialPurchasIDSource = null;
     this._site      = null;
     this.entityData = new MaterialPurchasDtlEntityData();
     this.backupData = null;
 }
示例#2
0
 void IEditableObject.BeginEdit()
 {
     if (!this.inTxn)
     {
         this.backupData = this.entityData.Clone() as MaterialPurchasDtlEntityData;
         this.inTxn      = true;
     }
 }
示例#3
0
 void IEditableObject.CancelEdit()
 {
     if (this.inTxn)
     {
         this.entityData = this.backupData;
         this.backupData = null;
         this.inTxn      = false;
         if (base.bindingIsNew && (this.parentCollection != null))
         {
             this.parentCollection.Remove((MaterialPurchasDtl)this);
         }
     }
 }
示例#4
0
 public MaterialPurchasDtlBase(int?materialPurchasDtlMaterialPurchasID, string materialPurchasDtlTypeStandard, string materialPurchasDtlUnit, decimal?materialPurchasDtlNumber, DateTime?materialPurchasDtlNeedDate, DateTime?materialPurchasDtlSignDate, string materialPurchasDtlSearchPriceDtl, decimal?materialPurchasDtlFinalPrice)
 {
     this.inTxn = false;
     this._materialPurchasIDSource = null;
     this._site             = null;
     this.entityData        = new MaterialPurchasDtlEntityData();
     this.backupData        = null;
     this.MaterialPurchasID = materialPurchasDtlMaterialPurchasID;
     this.TypeStandard      = materialPurchasDtlTypeStandard;
     this.Unit           = materialPurchasDtlUnit;
     this.Number         = materialPurchasDtlNumber;
     this.NeedDate       = materialPurchasDtlNeedDate;
     this.SignDate       = materialPurchasDtlSignDate;
     this.SearchPriceDtl = materialPurchasDtlSearchPriceDtl;
     this.FinalPrice     = materialPurchasDtlFinalPrice;
 }
示例#5
0
 void IEditableObject.EndEdit()
 {
     if (this.inTxn)
     {
         this.backupData = null;
         if (base.IsDirty)
         {
             if (base.bindingIsNew)
             {
                 this.EntityState  = EntityState.Added;
                 base.bindingIsNew = false;
             }
             else if (this.EntityState == EntityState.Unchanged)
             {
                 this.EntityState = EntityState.Changed;
             }
         }
         base.bindingIsNew = false;
         this.inTxn        = false;
     }
 }