public void DynBeforeUpdate(BEManager be, DataRow dr, appDB.ddTableRow ruleDefinition, Dictionary <string, appDB.ddFieldRow> ruleColumnMap) { if (ruleDefinition == null) { return; } FileManager fm = GetFMFromBE(be); foreach (appDB.ddRuleRow ddr in ruleDefinition.GetddRuleRows()) { //for "beforeupdate" event if (ddr.EventId == 2 && ddr.Enabled) { //check rules RunRule(null, dr, null, fm, null, ddr); } if (ddr.EventId == 10 && ddr.Enabled) { //check rules //needs to run for column //need columnmap DataColumn dc = dr.Table.Columns[ddr.ddFieldRow.DBFieldName]; appDB.ddFieldRow dfr = ruleColumnMap[dc.ColumnName]; RunRule(dc, dr, ruleColumnMap, fm, dfr, ddr); } if (ddr.EventId == 5 && ddr.Enabled && dr.RowState == DataRowState.Added) { //check rules RunRule(null, dr, null, fm, null, ddr); } } }
public void DynBeforeDelete(BEManager be, DataRow dr, appDB.ddTableRow ruleDefinition) { if (ruleDefinition == null) { return; } FileManager fm = GetFMFromBE(be); //find rules for field foreach (appDB.ddRuleRow ddr in ruleDefinition.GetddRuleRows()) { //for "beforedelete" event if (ddr.EventId == 3 && ddr.Enabled) { //check rules RunRule(null, dr, null, fm, null, ddr); } } }
public void DynAfterUpdate(BEManager be, DataRow dr, appDB.ddTableRow ruleDefinition) { if (ruleDefinition == null) { return; } //rarely used except for toc xml which is obsolete FileManager fm = GetFMFromBE(be); //find rules for field foreach (appDB.ddRuleRow ddr in ruleDefinition.GetddRuleRows()) { //for "afterupdate" event if (ddr.EventId == 8 && ddr.Enabled) { //check rules RunRule(null, dr, null, fm, null, ddr); } } }
public void DynAfterAdd(BEManager be, DataRow dr, appDB.ddTableRow ruleDefinition) { if (ruleDefinition == null) { return; } FileManager fm = GetFMFromBE(be); //set defaults myA.GetddField().DynDefaultValues(fm, dr, ruleDefinition); foreach (appDB.ddRuleRow ddr in ruleDefinition.GetddRuleRows()) { //for "beforeupdate" event if (ddr.EventId == 4 && ddr.Enabled) { //check rules RunRule(null, dr, null, fm, null, ddr); } } }