public MaterialPurchasDtlBase() { this.inTxn = false; this._materialPurchasIDSource = null; this._site = null; this.entityData = new MaterialPurchasDtlEntityData(); this.backupData = null; }
void IEditableObject.BeginEdit() { if (!this.inTxn) { this.backupData = this.entityData.Clone() as MaterialPurchasDtlEntityData; this.inTxn = true; } }
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); } } }
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; }
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; } }