Exemple #1
0
        public static void SetForceField <T>(this DataRow row, InternalDataColumn column, T value, object editor)
        {
            if (column.Editor != null)
            {
                throw new ArgumentException();
            }
            var readOnly = column.ReadOnly;

            try
            {
                column.Editor = editor;
                if (readOnly == true)
                {
                    column.ReadOnly = false;
                }
                row.SetField(column, value);
            }
            finally
            {
                if (readOnly == true)
                {
                    column.ReadOnly = true;
                }
                column.Editor = null;
            }
        }
 public void AttachTarget(InternalDataColumn targetColumn)
 {
     this.ColumnID         = targetColumn.ColumnID;
     this.IsKey            = targetColumn.IsKey;
     this.Unique           = targetColumn.Unique;
     this.ColumnName       = targetColumn.ColumnName;
     this.DataTypeName     = targetColumn.DataTypeName;
     this.DefaultValue     = targetColumn.DefaultValue;
     this.AutoIncrement    = targetColumn.AutoIncrement;
     this.AllowNull        = targetColumn.AllowDBNull;
     this.ReadOnly         = targetColumn.ReadOnly;
     this.Comment          = targetColumn.Comment;
     this.Tags             = targetColumn.Tags;
     this.CreationInfo     = targetColumn.CreationInfo;
     this.ModificationInfo = targetColumn.ModificationInfo;
     this.TargetColumn     = targetColumn;
 }
 public void CopyTo(InternalDataColumn dest)
 {
     dest.InternalAllowDBNull      = this.InternalAllowDBNull;
     dest.InternalAutoIncrement    = this.InternalAutoIncrement;
     dest.InternalColumnName       = this.InternalColumnName;
     dest.InternalDataType         = this.InternalDataType;
     dest.InternalCremaType        = this.InternalCremaType;
     dest.InternalDefaultValue     = this.InternalDefaultValue;
     dest.InternalExpression       = this.InternalExpression;
     dest.InternalValidation       = this.InternalValidation;
     dest.InternalUnique           = this.InternalUnique;
     dest.InternalReadOnly         = this.InternalReadOnly;
     dest.InternalComment          = this.InternalComment;
     dest.InternalIsKey            = this.InternalIsKey;
     dest.InternalCreationInfo     = this.InternalCreationInfo;
     dest.InternalModificationInfo = this.InternalModificationInfo;
     dest.InternalTags             = this.InternalTags;
     dest.InternalColumnID         = this.InternalColumnID;
 }
Exemple #4
0
 public void SetNull(InternalDataColumn column)
 {
     base.SetNull(column);
 }
Exemple #5
0
 internal CremaDataColumnChangeEventArgs(DataColumnChangeEventArgs e)
 {
     this.dataRow       = e.Row as InternalDataRow;
     this.dataColumn    = e.Column as InternalDataColumn;
     this.ProposedValue = e.ProposedValue;
 }
 internal CremaDataColumn(InternalDataColumn dataColumn)
 {
     this.InternalObject = dataColumn;
 }
 internal static T Field <T>(this CremaDataRow row, InternalDataColumn column)
 {
     return(row.InternalObject.Field <T>(column));
 }