Ejemplo n.º 1
0
        public Column(IDataReader dr)
        {
            this.ColumnId     = Convert.ToInt32(dr["Column_id"]);
            this.Name         = Convert.ToString(dr["ColumnName"]);
            this.DBTypeName   = Convert.ToString(dr["Type"]);
            this.Length       = Convert.ToInt32(dr["Length"]);
            this.Precision    = Convert.ToInt32(dr["Precision"]);
            this.Scale        = Convert.ToInt32(dr["SCALE"]);
            this.IsIdentity   = Convert.ToBoolean(dr["IDENTITY"]);
            this.IsPrimaryKey = Convert.ToBoolean(dr["PrimaryKey"]);
            this.NullAble     = Convert.ToBoolean(dr["NullAble"]);
            this.Remarks      = Convert.ToString(dr["ColumnDesc"]);
            this.Default      = Convert.ToString(dr["Default"]);
            this.CreateTime   = Convert.ToDateTime(dr["Create_Date"]);
            this.ModifyTime   = Convert.ToDateTime(dr["Modify_Date"]);
            //this.IsAssistant=

            string csTypeName, convertFormat;

            TypeMappings.GetTypeName(DBTypeName, out csTypeName, out convertFormat);
            this.CSTypeName    = csTypeName;
            this.ConvertFormat = convertFormat;
        }