コード例 #1
0
        protected DbColumn(DbRow dbRow, int dbColIdx, ColAttrib colAttrib)
        {
            this.DbRow        = dbRow;
            this.DbColNameIdx = dbColIdx;
            //ColAttrib colType = dbRow.getColumnAttrb(dbColIdx);
            switch (colAttrib)
            {
            case ColAttrib.AutoID:
                this.isPrimaryKeyCol = true;
                this.isAutoID        = true;
                this.isNullable      = false;
                this.isReadOnly      = true;
                break;

            case ColAttrib.PrKey:
                this.isPrimaryKeyCol = true;
                this.isNullable      = false;
                break;

            case ColAttrib.ReadWrite:
                break;

            case ColAttrib.ModDate:
                this.isReadOnly = true;
                this.isModDate  = true;
                break;

            case ColAttrib.ReadOnly:
            case ColAttrib.CreateDate:
            default:
                this.isReadOnly = true;
                break;
            }
            this.modified = false;
        }
コード例 #2
0
 public DbColLong(int colIdx, DbRow dbRow, SqlDataReader rdr, ColAttrib colAttrib)
     : base(dbRow, colIdx, colAttrib)
 {
     if (rdr != null)
     {
         readData(rdr);
     }
     else
     {
         this._value = 0;
     }
 }
コード例 #3
0
 public DbColDateTime(int colIdx, DbRow dbRow, SqlDataReader rdr, ColAttrib colAttrib)
     : base(dbRow, colIdx, colAttrib)
 {
     if (rdr != null)
     {
         readData(rdr);
     }
     else
     {
         this._value = default(DateTime);
     }
 }