GetDefaultRecord() приватный Метод

private GetDefaultRecord ( ) : int
Результат int
Пример #1
0
 internal override void CheckConstraint(DataRow row, DataRowAction action)
 {
     if (Table.EnforceConstraints &&
         (action == DataRowAction.Add ||
          action == DataRowAction.Change ||
          (action == DataRowAction.Rollback && row._tempRecord != -1)))
     {
         if (row.HaveValuesChanged(ColumnsReference))
         {
             if (ConstraintIndex.IsKeyRecordInIndex(row.GetDefaultRecord()))
             {
                 object[] values = row.GetColumnValues(ColumnsReference);
                 throw ExceptionBuilder.ConstraintViolation(ColumnsReference, values);
             }
         }
     }
 }
 internal override void CheckConstraint(DataRow row, DataRowAction action) {
     if (Table.EnforceConstraints &&
         (action == DataRowAction.Add ||
          action == DataRowAction.Change ||
          (action == DataRowAction.Rollback && row.tempRecord != -1))) {
         if (row.HaveValuesChanged(ColumnsReference)) {
             if (ConstraintIndex.IsKeyRecordInIndex(row.GetDefaultRecord())) {
                 object[] values = row.GetColumnValues(ColumnsReference);
                 throw ExceptionBuilder.ConstraintViolation(ColumnsReference, values);
             }
         }
     }
 }
Пример #3
0
 internal void CheckMaxLength(DataRow dr)
 {
     if (0 <= _maxLength)
     {
         Debug.Assert(IsStringType, "not a String or SqlString column");
         if (_maxLength < GetStringLength(dr.GetDefaultRecord()))
         {
             throw ExceptionBuilder.LongerThanMaxLength(this);
         }
     }
 }
Пример #4
0
 internal void CheckNullable(DataRow row)
 {
     if (!AllowDBNull)
     {
         Debug.Assert(null != _storage, "no storage");
         if (_storage.IsNull(row.GetDefaultRecord()))
         {
             throw ExceptionBuilder.NullValues(ColumnName);
         }
     }
 }
 internal override void CheckConstraint(DataRow row, DataRowAction action)
 {
     if ((this.Table.EnforceConstraints && (((action == DataRowAction.Add) || (action == DataRowAction.Change)) || ((action == DataRowAction.Rollback) && (row.tempRecord != -1)))) && (row.HaveValuesChanged(this.ColumnsReference) && this.ConstraintIndex.IsKeyRecordInIndex(row.GetDefaultRecord())))
     {
         object[] columnValues = row.GetColumnValues(this.ColumnsReference);
         throw ExceptionBuilder.ConstraintViolation(this.ColumnsReference, columnValues);
     }
 }