void columnEvent(ColumnChangeEventType pEvent, object sender, DataColumnChangeEventArgs e) { if (e.Row.RowState != DataRowState.Detached) { if (!blockPointMain.isBlocked()) { string col = e.Column.ColumnName; DataRow row = getRow(pEvent, e.Column.ColumnName); if (row != null) { List <ITableColumnChange> listA = (List <ITableColumnChange>)row[colACTIVITY]; List <IRowValidator> listV = (List <IRowValidator>)row[colVALIDATOR]; List <IBlockPoint> listB = (List <IBlockPoint>)row[colBLOCK]; for (int i = 0; i < listA.Count; ++i) { if (listB[i].block()) { try { if (listV[i].check(e.Row)) { listA[i].columnChange(e); } } finally { listB[i].unblock(); } } } } } } }
void _tableSchema_ColumnChanged(object sender, DataColumnChangeEventArgs e) { try { if (e.Row.RowState != DataRowState.Detached) { if (!_blockPoint.isBlocked()) { double curCf = (double)e.Row[TableDUMMY.CONVFACT]; double curAmount = (double)e.Row[TableDUMMY.AMOUNT]; double curPrice = (double)e.Row[TableDUMMY.PRICE]; double curTot = (double)e.Row[TableDUMMY.TOTAL]; double curDiscper = (double)e.Row[TableDUMMY.DISCPER]; switch (e.Column.ColumnName) { case TableDUMMY.AMOUNT: refreshVal(curAmount, curCf, TableDUMMY.AMOUNT, false); break; case TableDUMMY.PRICE: refreshVal(curPrice, curCf, TableDUMMY.PRICE, true); break; case TableDUMMY.TOTAL: refreshVal(curTot, TableDUMMY.TOTAL); break; case TableDUMMY.DISCPER: refreshVal(curDiscper, TableDUMMY.DISCPER); break; } } } } catch (Exception exc) { ToolMobile.setException(exc); } }
public bool isBlocked() { return(blockPoint.isBlocked()); }