public MaterialPurchasBase() { this.inTxn = false; this._projectCodeSource = null; this._site = null; this.entityData = new MaterialPurchasEntityData(); this.backupData = null; }
void IEditableObject.BeginEdit() { if (!this.inTxn) { this.backupData = this.entityData.Clone() as MaterialPurchasEntityData; 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((MaterialPurchas)this); } } }
public MaterialPurchasBase(string materialPurchasMaterialPurchasCode, string materialPurchasPurchasUnitCode, DateTime?materialPurchasPurchasDate, string materialPurchasProjectCode, string materialPurchasTitle, string materialPurchasDescription, string materialPurchasFollowUserCode, string materialPurchasStatus) { this.inTxn = false; this._projectCodeSource = null; this._site = null; this.entityData = new MaterialPurchasEntityData(); this.backupData = null; this.MaterialPurchasCode = materialPurchasMaterialPurchasCode; this.PurchasUnitCode = materialPurchasPurchasUnitCode; this.PurchasDate = materialPurchasPurchasDate; this.ProjectCode = materialPurchasProjectCode; this.Title = materialPurchasTitle; this.Description = materialPurchasDescription; this.FollowUserCode = materialPurchasFollowUserCode; this.Status = materialPurchasStatus; }
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; } }