230 references to DataRowState
System.Data (219)
fx\src\data\System\Data\Common\AdapterUtil.cs (12)
489
static internal ArgumentOutOfRangeException InvalidDataRowState(
DataRowState
value) {
501
return InvalidEnumerationValue(typeof(
DataRowState
), (int) value);
2329
const
DataRowState
rowStates =
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified;
2336
case
DataRowState
.Added:
2339
case
DataRowState
.Deleted:
2342
case
DataRowState
.Modified:
2358
case
DataRowState
.Added:
2361
case
DataRowState
.Deleted:
2364
case
DataRowState
.Modified:
fx\src\data\System\Data\Common\DbDataAdapter.cs (12)
855
case
DataRowState
.Detached:
856
case
DataRowState
.Unchanged:
858
case
DataRowState
.Added:
862
case
DataRowState
.Deleted:
866
case
DataRowState
.Modified:
913
if (
DataRowState
.Unchanged == dataRow.RowState) { // MDAC 66286
919
if (
DataRowState
.Unchanged == dataRow.RowState) { // MDAC 66286
1389
if (0 != ((
DataRowState
.Added|
DataRowState
.Deleted|
DataRowState
.Modified)&row.RowState)) {
1450
if (0 != ((
DataRowState
.Detached|
DataRowState
.Unchanged) & row.RowState)) {
fx\src\data\System\Data\DataColumn.cs (1)
1404
if (dr.RowState ==
DataRowState
.Deleted)
fx\src\data\System\Data\DataException.cs (2)
1051
static public Exception InvalidRowState(
DataRowState
state) {
1052
return _InvalidEnumArgumentException<
DataRowState
>(state);
fx\src\data\System\Data\DataRow.cs (17)
140
public
DataRowState
RowState {
156
return
DataRowState
.Detached; // 2
162
return
DataRowState
.Modified; // 3 + _columns.columnsImplementingIChangeTracking.Count
166
return
DataRowState
.Unchanged; // 3
169
return
DataRowState
.Added; // 2
172
return
DataRowState
.Deleted; // 3
174
return
DataRowState
.Modified; // 3
495
if (this.RowState !=
DataRowState
.Detached && this.RowState !=
DataRowState
.Deleted) {
1089
if (this.RowState !=
DataRowState
.Detached) {
1094
if (this.RowState !=
DataRowState
.Deleted)
1108
if (this.RowState !=
DataRowState
.Deleted)
1246
if (this.RowState ==
DataRowState
.Unchanged) {
1255
if (this.RowState ==
DataRowState
.Unchanged) {
1280
DataRowState
state = RowState;
1281
if ((
DataRowState
.Added == state) || (
DataRowState
.Modified == state)) { //Copy current record for the row in Added, Modified state.
fx\src\data\System\Data\DataRowCollection.cs (4)
101
if ((null == row) || (row.Table != this.table) || ((0 == row.RBTreeNodeId) && (row.RowState ==
DataRowState
.Detached))) //Webdata 102857
207
if ((row.RowState !=
DataRowState
.Deleted) && (row.RowState !=
DataRowState
.Detached))
210
if (row.RowState !=
DataRowState
.Detached)
fx\src\data\System\Data\DataSet.cs (27)
1229
return GetChanges(
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified);
1254
public DataSet GetChanges(
DataRowState
rowStates)
1261
if (0 != (rowStates & ~(
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified |
DataRowState
.Unchanged))) {
1307
private void MarkModifiedRows(TableChanges[] bitMatrix,
DataRowState
rowStates) {
1315
DataRowState
rowState = row.RowState;
1316
Debug.Assert(
DataRowState
.Added == rowState ||
1317
DataRowState
.Deleted == rowState ||
1318
DataRowState
.Modified == rowState ||
1319
DataRowState
.Unchanged == rowState,
1326
if (
DataRowState
.Deleted != rowState) {
1347
if (
DataRowState
.Deleted != relatedRow.RowState) {
1440
return HasChanges(
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified);
1445
/// deleted, or modified rows, filtered by <see cref='System.Data.
DataRowState
'/>.</para>
1447
public bool HasChanges(
DataRowState
rowStates)
1453
const
DataRowState
allRowStates =
DataRowState
.Detached |
DataRowState
.Unchanged |
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified;
fx\src\data\System\Data\DataTable.cs (45)
636
DataRowState
rowState = row.RowState;
638
case
DataRowState
.Unchanged:
642
case
DataRowState
.Added:
646
case
DataRowState
.Modified:
651
case
DataRowState
.Deleted:
739
case
DataRowState
.Unchanged:
744
case
DataRowState
.Added:
749
case
DataRowState
.Modified:
755
case
DataRowState
.Deleted:
782
private
DataRowState
ConvertToRowState(BitArray bitStates, int bitIndex) {
790
return
DataRowState
.Unchanged;
792
return
DataRowState
.Added;
794
return
DataRowState
.Modified;
796
return
DataRowState
.Deleted;
2033
DataRowState
saveRowState = targetRow.RowState;
2034
int saveIdxRecord = (saveRowState ==
DataRowState
.Added) ? targetRow.newRecord : saveIdxRecord = targetRow.oldRecord;
2037
if (targetRow.RowState ==
DataRowState
.Unchanged && row.RowState ==
DataRowState
.Unchanged) {
2048
newRecord = (targetRow.RowState ==
DataRowState
.Unchanged)? recordManager.CopyRecord(this, oldRecord, -1) : targetRow.newRecord;
2055
if (saveIdxRecord != ((saveRowState ==
DataRowState
.Added) ? newRecord : oldRecord)) {
2058
saveIdxRecord = ((saveRowState ==
DataRowState
.Added) ? newRecord : oldRecord);
2067
if (targetRow.RowState ==
DataRowState
.Unchanged) {
2078
if (saveRowState ==
DataRowState
.Added && targetRow.oldRecord != -1)
2080
Debug.Assert(saveIdxRecord == ((saveRowState ==
DataRowState
.Added) ? targetRow.newRecord : targetRow.oldRecord), "oops, you change index record without noticing it");
2856
public DataTable GetChanges(
DataRowState
rowStates)
2865
Debug.Assert(Enum.GetUnderlyingType(typeof(
DataRowState
)) == typeof(Int32), "Invalid DataRowState type");
2968
if (row.RowState !=
DataRowState
.Unchanged) { // not unchanged, it means Added or modified
3046
if (row.RowState ==
DataRowState
.Unchanged){ // how about row.oldRecord == row.newRecord both == -1
3893
(row.RowState !=
DataRowState
.Unchanged ?
3994
if (row.RowState ==
DataRowState
.Detached && row.rowID != -1) {
4082
if (row.RowState ==
DataRowState
.Detached && row.rowID != -1) {
4225
if (row.RowState ==
DataRowState
.Deleted)
4527
if (loadOption != LoadOption.Upsert || dataRow.RowState !=
DataRowState
.Deleted) {
4610
case
DataRowState
.Unchanged:
4619
case
DataRowState
.Deleted:
4629
case
DataRowState
.Unchanged:
4655
if (
DataRowState
.Detached == dataRow.RowState) {
4687
if (dataRow.RowState ==
DataRowState
.Unchanged) {
4694
if (dataRow.RowState ==
DataRowState
.Deleted)
4700
if (dataRow.RowState ==
DataRowState
.Unchanged) {
6327
if (dr.RowState ==
DataRowState
.Deleted) {
6341
if (row.RowState ==
DataRowState
.Deleted) {
6367
if (cachedRow != null && ((cachedRow.RowState !=
DataRowState
.Deleted) && (version != DataRowVersion.Original || cachedRow.oldRecord != -1))) {// if deleted GetRecordFromVersion will throw
6385
if (parentRow != null && ((parentRow.RowState !=
DataRowState
.Deleted) && (version != DataRowVersion.Original || parentRow.oldRecord != -1))) {// if deleted GetRecordFromVersion will throw
6402
if (childRow != null && ((childRow.RowState !=
DataRowState
.Deleted) && (version != DataRowVersion.Original || childRow.oldRecord != -1))) { // if deleted GetRecordFromVersion will throw
fx\src\data\System\Data\DataTableReader.cs (6)
197
while (currentDataRow.RowState ==
DataRowState
.Deleted) {
247
if ((currentDataRow == null) || (currentDataRow.RowState ==
DataRowState
.Deleted)) {
265
if ((currentDataRow == null) || (currentDataRow.RowState ==
DataRowState
.Deleted)) {
757
if ((currentDataRow.RowState ==
DataRowState
.Deleted) || (currentDataRow.RowState ==
DataRowState
.Detached) ||currentRowRemoved)
818
if ( args.Row.RowState ==
DataRowState
.Detached ) {
fx\src\data\System\Data\DataView.cs (2)
841
if (
DataRowState
.Detached == newRow.RowState) {
922
if ((null != index) && (
DataRowState
.Detached != rowview.Row.RowState)) {
fx\src\data\System\Data\DataViewRowState.cs (4)
24
Unchanged =
DataRowState
.Unchanged,
25
Added =
DataRowState
.Added,
26
Deleted =
DataRowState
.Deleted,
27
ModifiedCurrent =
DataRowState
.Modified,
fx\src\data\System\Data\Filter\AggregateNode.cs (2)
180
if (rows[i].RowState ==
DataRowState
.Deleted) {
187
else if ((DataRowAction.Rollback == rows[i]._action) && (rows[i].RowState ==
DataRowState
.Added)) {
fx\src\data\System\Data\Filter\DataExpression.cs (1)
153
if (row.RowState ==
DataRowState
.Deleted)
fx\src\data\System\Data\ForeignKeyConstraint.cs (7)
236
if (row.RowState ==
DataRowState
.Detached)
239
Index childIndex = childKey.GetSortIndex( row.RowState ==
DataRowState
.Deleted ? DataViewRowState.Deleted : DataViewRowState.CurrentRows );
240
object[] key = row.GetKeyValues(parentKey, row.RowState ==
DataRowState
.Deleted ? DataRowVersion.Original : DataRowVersion.Default );
252
if (
DataRowState
.Detached != childRow.RowState) {
343
Index childIndex = childKey.GetSortIndex( row.RowState ==
DataRowState
.Deleted ? DataViewRowState.OriginalRows : DataViewRowState.CurrentRows);
344
object[] key = row.GetKeyValues(parentKey, row.RowState ==
DataRowState
.Modified ? DataRowVersion.Current : DataRowVersion.Default );
364
if (row.RowState !=
DataRowState
.Deleted && row.Table.DataSet.EnforceConstraints) {
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (13)
245
private
DataRowState
_rowStateToSkip;
1040
Debug.Assert((_rowStateToSkip &
DataRowState
.Deleted) != 0, "Deleted is a permitted rowstate?");
1526
public void WriteToServer(DataTable table,
DataRowState
rowState) {
1540
_rowStateToSkip = ((rowState == 0) || (rowState ==
DataRowState
.Deleted)) ?
DataRowState
.Deleted : ~rowState |
DataRowState
.Deleted;
1577
_rowStateToSkip =
DataRowState
.Deleted; // Don't allow deleted rows
1627
_rowStateToSkip =
DataRowState
.Deleted; // Don't allow deleted rows
1712
public Task WriteToServerAsync(DataTable table,
DataRowState
rowState) {
1715
public Task WriteToServerAsync(DataTable table,
DataRowState
rowState, CancellationToken cancellationToken) {
1730
_rowStateToSkip = ((rowState == 0) || (rowState ==
DataRowState
.Deleted)) ?
DataRowState
.Deleted : ~rowState |
DataRowState
.Deleted;
fx\src\data\System\Data\XmlDataLoader.cs (3)
101
if (r != null && r.RowState ==
DataRowState
.Detached) {
797
bool unchanged = (childRow.RowState ==
DataRowState
.Unchanged);
1051
bool unchanged = (childRow.RowState ==
DataRowState
.Unchanged);
fx\src\data\System\Data\xmlsaver.cs (9)
2155
DataRowState
state = row.RowState;
2156
if ((state ==
DataRowState
.Unchanged ) || (state ==
DataRowState
.Added)) {
2168
if ( (state ==
DataRowState
.Deleted ) && (row.Table.NestedParentRelations.Length != 0)){
2186
if ( (state ==
DataRowState
.Deleted ) && XmlDataTreeWriter.RowHasErrors(row))
2442
if (row.RowState ==
DataRowState
.Deleted)
2506
if (row.RowState ==
DataRowState
.Deleted)
2549
if (row.RowState ==
DataRowState
.Added) {
2552
if (row.RowState ==
DataRowState
.Modified) {
fx\src\data\System\NewXml\DataPointer.cs (4)
114
if (row.RowState ==
DataRowState
.Deleted)
121
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
461
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
679
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
fx\src\data\System\NewXml\XmlDataDocument.cs (40)
35
DataRowState
rollbackState;
127
if ( fAddRowsToTable && r.RowState ==
DataRowState
.Detached )
162
if ( fAddRowsToTable && r.RowState ==
DataRowState
.Detached )
597
Debug.Assert( node.Row.RowState !=
DataRowState
.Deleted );
612
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
1133
case
DataRowState
.Added:
1134
case
DataRowState
.Unchanged:
1135
case
DataRowState
.Modified:
1139
case
DataRowState
.Deleted:
1142
case
DataRowState
.Detached:
1196
Debug.Assert( row.RowState ==
DataRowState
.Detached );
1205
Debug.Assert( row.RowState ==
DataRowState
.Detached );
1216
Debug.Assert( row.RowState ==
DataRowState
.Detached );
1417
Debug.Assert( args.Row.RowState !=
DataRowState
.Deleted );
1432
if ( row.RowState ==
DataRowState
.Detached ) {
1749
if ( oldRowElem.Row.RowState ==
DataRowState
.Detached )
1807
case
DataRowState
.Deleted:
1812
case
DataRowState
.Added:
1816
case
DataRowState
.Modified:
1827
if ( row.RowState ==
DataRowState
.Detached ) {
1887
case
DataRowState
.Deleted:
1890
case
DataRowState
.Detached:
1893
case
DataRowState
.Added:
1896
case
DataRowState
.Modified:
2181
if ( row.RowState ==
DataRowState
.Deleted )
2378
return ( row.RowState & (
DataRowState
.Added |
DataRowState
.Unchanged |
DataRowState
.Modified ) ) != 0;
2461
DataRowState
rowState = row.RowState;
2464
case
DataRowState
.Detached:
2486
case
DataRowState
.Deleted:
2520
DataRowState
rowState = row.RowState;
2523
case
DataRowState
.Detached:
2539
case
DataRowState
.Deleted:
2543
case
DataRowState
.Unchanged:
2544
case
DataRowState
.Modified:
2549
case
DataRowState
.Added:
2587
Debug.Assert( row.RowState ==
DataRowState
.Detached || row.RowState ==
DataRowState
.Deleted );
2589
if ( row.RowState ==
DataRowState
.Detached )
fx\src\data\System\NewXml\XPathNodePointer.cs (8)
298
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
332
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
509
if (row.RowState ==
DataRowState
.Deleted)
516
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
529
if (row.RowState ==
DataRowState
.Deleted)
536
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
1213
DataRowVersion rowVersion = ( curRow.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
1490
DataRowVersion rowVersion = ( row.RowState ==
DataRowState
.Detached ) ? DataRowVersion.Proposed : DataRowVersion.Current;
System.Data.DataSetExtensions (11)
System\Data\DataRowComparer.cs (3)
167
if (leftRow.RowState ==
DataRowState
.Deleted || rightRow.RowState ==
DataRowState
.Deleted)
201
if (row.RowState ==
DataRowState
.Deleted)
System\Data\DataSetUtil.cs (2)
81
static internal ArgumentOutOfRangeException InvalidDataRowState(
DataRowState
value)
95
return InvalidEnumerationValue(typeof(
DataRowState
), (int)value);
System\Data\DataTableExtensions.cs (6)
186
case
DataRowState
.Detached:
191
goto case
DataRowState
.Added;
192
case
DataRowState
.Unchanged:
193
case
DataRowState
.Added:
194
case
DataRowState
.Modified:
205
case
DataRowState
.Deleted: