public void SetModified()
{
if (RowState == DataRowState.Unchanged)
{
_tempRecord = _table.NewRecord(_newRecord);
if (_tempRecord != -1)
{
// suppressing the ensure property changed because no values have changed
_table.SetNewRecord(this, _tempRecord, suppressEnsurePropertyChanged: true);
}
}
else
{
throw ExceptionBuilder.SetAddedAndModifiedCalledOnnonUnchanged();
}
}