public long getCellTouch(DataRow row, string col) { TouchObj list = getList(row); if (list.dic.ContainsKey(col)) { return(list.dic[col]); } return(untouched); //if (row != null && col != null) //{ // DataRow rowTouch = accessTable.Rows.Find(new object[] { col, row }); // if (rowTouch != null) // return (long)rowTouch[colSEQ]; //} //return untouched; }
public void touchCell(DataRow row, string col) { TouchObj list = getList(row); if (list.dic.ContainsKey(col)) { list.dic[col] = getNextTouchId(); } else { list.dic.Add(col, getNextTouchId()); } //if (row != null && col != null) //{ // DataRow rowTouch = accessTable.Rows.Find(new object[] { col, row }); // if (rowTouch == null) // accessTable.Rows.Add(new object[] { col, row, getNextTouchId() }); // else // rowTouch[colSEQ] = getNextTouchId(); //} }
TouchObj getList(DataRow row) { TouchObj list = null; int colIndx = row.Table.Columns.IndexOf(colTouchList); if (colIndx < 0) { colIndx = row.Table.Columns.Add(colTouchList, typeof(TouchObj)).Ordinal; } if (row.IsNull(colIndx)) { row[colIndx] = list = new TouchObj(); } else { list = (TouchObj)row[colIndx]; } return(list); }