Beispiel #1
0
 public MaterialPurchasBase()
 {
     this.inTxn = false;
     this._projectCodeSource = null;
     this._site      = null;
     this.entityData = new MaterialPurchasEntityData();
     this.backupData = null;
 }
Beispiel #2
0
 void IEditableObject.BeginEdit()
 {
     if (!this.inTxn)
     {
         this.backupData = this.entityData.Clone() as MaterialPurchasEntityData;
         this.inTxn      = true;
     }
 }
Beispiel #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((MaterialPurchas)this);
         }
     }
 }
Beispiel #4
0
 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;
 }
Beispiel #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;
     }
 }