public static void UpdateRow(DataRow newRow, ref TrackingDataTableStruct carTable) { int iRowIndex = Find(newRow, carTable); if (iRowIndex == -1) { carTable.Rows.Add(newRow); } else { DataRow dr = carTable.Rows[iRowIndex]; foreach (DataColumn col in carTable.Columns) { if (col.Unique != true) dr[col] = newRow[col]; } } }
public static void UpdateRow(DataRow newRow, ref TrackingDataTableStruct carTable) { int iRowIndex = Find(newRow, carTable); if (iRowIndex == -1) { carTable.Rows.Add(newRow); } else { DataRow dr = carTable.Rows[iRowIndex]; foreach (DataColumn col in carTable.Columns) { if (col.Unique != true) { dr[col] = newRow[col]; } } } }