protected override void RowChanged(object sender, RowChangedEventArgs e) { if (this.logger == null) { return; } logger.RowChanged(sender, e); }
private bool OnRowChanged(ObjectState state, bool saved) { if (RowChanged != null) { RowChangedEventArgs args = new RowChangedEventArgs(this, state, saved); RowChanged(this, args); return(args.confirmed); } return(true); }
private bool OnRowChanged(ObjectState state, bool saved) { if (RowChanged != null) { RowChangedEventArgs args = new RowChangedEventArgs(this, state, saved); RowChanged(this, args); return args.confirmed; } return true; }
protected virtual void RowChanged(object sender, RowChangedEventArgs e) { }
/// <summary> /// fire RowChanged event when row changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void RowChanged(object sender, RowChangedEventArgs e) { if (this.logger == null) return; logger.RowChanged(sender, e); }
public void RowChanged(object sender, RowChangedEventArgs e) { if (e.state == ObjectState.Added || e.state == ObjectState.Deleted || e.state == ObjectState.Modified) { if (!log_transaction) throw new MessageException("TransactionID is not assgined yet."); if (this.rowID == 0) { if (e.saved) //log after save with identity value created { if (dpoType != null) { DPObject dpo = (DPObject)Activator.CreateInstance(dpoType, new object[] { e.adapter.Row }); this.rowID = dpo.RowId; } else if (this.rowIdColumnName != null) { this.rowID = (int)e.adapter.Row[this.rowIdColumnName]; } else throw new MessageException("DPO Type is not defined"); } else return; } modified = e.state == ObjectState.Modified; if (e.state == ObjectState.Modified || e.state == ObjectState.Added || e.state == ObjectState.Deleted) { log_row_id = this.logee.LogRow(log_transaction, this.tableName, this.tableId, this.rowID, e.state, e.adapter.Row1, e.adapter.Row); logged = log_row_id > 0 ; } } }