예제 #1
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarFlagID = new TableSchema.TableColumn(this);
            colvarFlagID.ColumnName = "FlagID";
            colvarFlagID.DataType = DbType.Int32;
            colvarFlagID.MaxLength = 0;
            colvarFlagID.AutoIncrement = true;
            colvarFlagID.IsNullable = false;
            colvarFlagID.IsPrimaryKey = false;
            colvarFlagID.IsForeignKey = false;
            colvarFlagID.IsReadOnly = false;

            colvarFlagID.DefaultSetting = @"";
            colvarFlagID.ForeignKeyTableName = "";
            colvarFlagID.ApplyExtendedProperties();
            this.Columns.Add(colvarFlagID);

            TableSchema.TableColumn colvarFlagName = new TableSchema.TableColumn(this);
            colvarFlagName.ColumnName = "FlagName";
            colvarFlagName.DataType = DbType.String;
            colvarFlagName.MaxLength = 150;
            colvarFlagName.AutoIncrement = false;
            colvarFlagName.IsNullable = true;
            colvarFlagName.IsPrimaryKey = false;
            colvarFlagName.IsForeignKey = false;
            colvarFlagName.IsReadOnly = false;

            colvarFlagName.DefaultSetting = @"";
            colvarFlagName.ForeignKeyTableName = "";
            colvarFlagName.ApplyExtendedProperties();
            this.Columns.Add(colvarFlagName);

            TableSchema.TableColumn colvarFlagMemo = new TableSchema.TableColumn(this);
            colvarFlagMemo.ColumnName = "FlagMemo";
            colvarFlagMemo.DataType = DbType.String;
            colvarFlagMemo.MaxLength = 250;
            colvarFlagMemo.AutoIncrement = false;
            colvarFlagMemo.IsNullable = true;
            colvarFlagMemo.IsPrimaryKey = false;
            colvarFlagMemo.IsForeignKey = false;
            colvarFlagMemo.IsReadOnly = false;

            colvarFlagMemo.DefaultSetting = @"";
            colvarFlagMemo.ForeignKeyTableName = "";
            colvarFlagMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarFlagMemo);
        }
예제 #2
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarOrderSumLimit = new TableSchema.TableColumn(this);
            colvarOrderSumLimit.ColumnName = "OrderSumLimit";
            colvarOrderSumLimit.DataType = DbType.Decimal;
            colvarOrderSumLimit.MaxLength = 0;
            colvarOrderSumLimit.AutoIncrement = false;
            colvarOrderSumLimit.IsNullable = true;
            colvarOrderSumLimit.IsPrimaryKey = false;
            colvarOrderSumLimit.IsForeignKey = false;
            colvarOrderSumLimit.IsReadOnly = false;

            colvarOrderSumLimit.DefaultSetting = @"";
            colvarOrderSumLimit.ForeignKeyTableName = "";
            colvarOrderSumLimit.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderSumLimit);

            TableSchema.TableColumn colvarClickCountLimit = new TableSchema.TableColumn(this);
            colvarClickCountLimit.ColumnName = "ClickCountLimit";
            colvarClickCountLimit.DataType = DbType.Int32;
            colvarClickCountLimit.MaxLength = 0;
            colvarClickCountLimit.AutoIncrement = false;
            colvarClickCountLimit.IsNullable = true;
            colvarClickCountLimit.IsPrimaryKey = false;
            colvarClickCountLimit.IsForeignKey = false;
            colvarClickCountLimit.IsReadOnly = false;

            colvarClickCountLimit.DefaultSetting = @"";
            colvarClickCountLimit.ForeignKeyTableName = "";
            colvarClickCountLimit.ApplyExtendedProperties();
            this.Columns.Add(colvarClickCountLimit);
        }
예제 #3
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarCompanyID = new TableSchema.TableColumn(this);
            colvarCompanyID.ColumnName = "CompanyID";
            colvarCompanyID.DataType = DbType.Int32;
            colvarCompanyID.MaxLength = 0;
            colvarCompanyID.AutoIncrement = false;
            colvarCompanyID.IsNullable = true;
            colvarCompanyID.IsPrimaryKey = false;
            colvarCompanyID.IsForeignKey = false;
            colvarCompanyID.IsReadOnly = false;

            colvarCompanyID.DefaultSetting = @"";
            colvarCompanyID.ForeignKeyTableName = "";
            colvarCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyID);

            TableSchema.TableColumn colvarMansionID = new TableSchema.TableColumn(this);
            colvarMansionID.ColumnName = "MansionID";
            colvarMansionID.DataType = DbType.Int32;
            colvarMansionID.MaxLength = 0;
            colvarMansionID.AutoIncrement = false;
            colvarMansionID.IsNullable = true;
            colvarMansionID.IsPrimaryKey = false;
            colvarMansionID.IsForeignKey = false;
            colvarMansionID.IsReadOnly = false;

            colvarMansionID.DefaultSetting = @"";
            colvarMansionID.ForeignKeyTableName = "";
            colvarMansionID.ApplyExtendedProperties();
            this.Columns.Add(colvarMansionID);
        }
예제 #4
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarOrderdate = new TableSchema.TableColumn(this);
            colvarOrderdate.ColumnName = "Orderdate";
            colvarOrderdate.DataType = DbType.DateTime;
            colvarOrderdate.MaxLength = 0;
            colvarOrderdate.AutoIncrement = false;
            colvarOrderdate.IsNullable = true;
            colvarOrderdate.IsPrimaryKey = false;
            colvarOrderdate.IsForeignKey = false;
            colvarOrderdate.IsReadOnly = false;

            colvarOrderdate.DefaultSetting = @"";
            colvarOrderdate.ForeignKeyTableName = "";
            colvarOrderdate.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderdate);
        }
예제 #5
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarAdsCount = new TableSchema.TableColumn(this);
            colvarAdsCount.ColumnName = "AdsCount";
            colvarAdsCount.DataType = DbType.Int32;
            colvarAdsCount.MaxLength = 0;
            colvarAdsCount.AutoIncrement = false;
            colvarAdsCount.IsNullable = true;
            colvarAdsCount.IsPrimaryKey = false;
            colvarAdsCount.IsForeignKey = false;
            colvarAdsCount.IsReadOnly = false;

            colvarAdsCount.DefaultSetting = @"";
            colvarAdsCount.ForeignKeyTableName = "";
            colvarAdsCount.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsCount);

            TableSchema.TableColumn colvarAdsPointSum = new TableSchema.TableColumn(this);
            colvarAdsPointSum.ColumnName = "AdsPointSum";
            colvarAdsPointSum.DataType = DbType.Decimal;
            colvarAdsPointSum.MaxLength = 0;
            colvarAdsPointSum.AutoIncrement = false;
            colvarAdsPointSum.IsNullable = true;
            colvarAdsPointSum.IsPrimaryKey = false;
            colvarAdsPointSum.IsForeignKey = false;
            colvarAdsPointSum.IsReadOnly = false;

            colvarAdsPointSum.DefaultSetting = @"";
            colvarAdsPointSum.ForeignKeyTableName = "";
            colvarAdsPointSum.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsPointSum);

            TableSchema.TableColumn colvarAdsMemberID = new TableSchema.TableColumn(this);
            colvarAdsMemberID.ColumnName = "AdsMemberID";
            colvarAdsMemberID.DataType = DbType.Int32;
            colvarAdsMemberID.MaxLength = 0;
            colvarAdsMemberID.AutoIncrement = false;
            colvarAdsMemberID.IsNullable = true;
            colvarAdsMemberID.IsPrimaryKey = false;
            colvarAdsMemberID.IsForeignKey = false;
            colvarAdsMemberID.IsReadOnly = false;

            colvarAdsMemberID.DefaultSetting = @"";
            colvarAdsMemberID.ForeignKeyTableName = "";
            colvarAdsMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsMemberID);

            TableSchema.TableColumn colvarCompanyAdsID = new TableSchema.TableColumn(this);
            colvarCompanyAdsID.ColumnName = "CompanyAdsID";
            colvarCompanyAdsID.DataType = DbType.Int32;
            colvarCompanyAdsID.MaxLength = 0;
            colvarCompanyAdsID.AutoIncrement = false;
            colvarCompanyAdsID.IsNullable = true;
            colvarCompanyAdsID.IsPrimaryKey = false;
            colvarCompanyAdsID.IsForeignKey = false;
            colvarCompanyAdsID.IsReadOnly = false;

            colvarCompanyAdsID.DefaultSetting = @"";
            colvarCompanyAdsID.ForeignKeyTableName = "";
            colvarCompanyAdsID.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyAdsID);

            TableSchema.TableColumn colvarCompanyID = new TableSchema.TableColumn(this);
            colvarCompanyID.ColumnName = "CompanyID";
            colvarCompanyID.DataType = DbType.Int32;
            colvarCompanyID.MaxLength = 0;
            colvarCompanyID.AutoIncrement = false;
            colvarCompanyID.IsNullable = true;
            colvarCompanyID.IsPrimaryKey = false;
            colvarCompanyID.IsForeignKey = false;
            colvarCompanyID.IsReadOnly = false;

            colvarCompanyID.DefaultSetting = @"";
            colvarCompanyID.ForeignKeyTableName = "";
            colvarCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyID);

            TableSchema.TableColumn colvarAdsClickDate = new TableSchema.TableColumn(this);
            colvarAdsClickDate.ColumnName = "AdsClickDate";
            colvarAdsClickDate.DataType = DbType.DateTime;
            colvarAdsClickDate.MaxLength = 0;
            colvarAdsClickDate.AutoIncrement = false;
            colvarAdsClickDate.IsNullable = true;
            colvarAdsClickDate.IsPrimaryKey = false;
            colvarAdsClickDate.IsForeignKey = false;
            colvarAdsClickDate.IsReadOnly = false;

            colvarAdsClickDate.DefaultSetting = @"";
            colvarAdsClickDate.ForeignKeyTableName = "";
            colvarAdsClickDate.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsClickDate);

            TableSchema.TableColumn colvarAdsTitle = new TableSchema.TableColumn(this);
            colvarAdsTitle.ColumnName = "AdsTitle";
            colvarAdsTitle.DataType = DbType.String;
            colvarAdsTitle.MaxLength = 500;
            colvarAdsTitle.AutoIncrement = false;
            colvarAdsTitle.IsNullable = true;
            colvarAdsTitle.IsPrimaryKey = false;
            colvarAdsTitle.IsForeignKey = false;
            colvarAdsTitle.IsReadOnly = false;

            colvarAdsTitle.DefaultSetting = @"";
            colvarAdsTitle.ForeignKeyTableName = "";
            colvarAdsTitle.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsTitle);

            TableSchema.TableColumn colvarOrderSum = new TableSchema.TableColumn(this);
            colvarOrderSum.ColumnName = "OrderSum";
            colvarOrderSum.DataType = DbType.Decimal;
            colvarOrderSum.MaxLength = 0;
            colvarOrderSum.AutoIncrement = false;
            colvarOrderSum.IsNullable = true;
            colvarOrderSum.IsPrimaryKey = false;
            colvarOrderSum.IsForeignKey = false;
            colvarOrderSum.IsReadOnly = false;

            colvarOrderSum.DefaultSetting = @"";
            colvarOrderSum.ForeignKeyTableName = "";
            colvarOrderSum.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderSum);

            TableSchema.TableColumn colvarMemberPhoneNumber = new TableSchema.TableColumn(this);
            colvarMemberPhoneNumber.ColumnName = "MemberPhoneNumber";
            colvarMemberPhoneNumber.DataType = DbType.String;
            colvarMemberPhoneNumber.MaxLength = 50;
            colvarMemberPhoneNumber.AutoIncrement = false;
            colvarMemberPhoneNumber.IsNullable = false;
            colvarMemberPhoneNumber.IsPrimaryKey = false;
            colvarMemberPhoneNumber.IsForeignKey = false;
            colvarMemberPhoneNumber.IsReadOnly = false;

            colvarMemberPhoneNumber.DefaultSetting = @"";
            colvarMemberPhoneNumber.ForeignKeyTableName = "";
            colvarMemberPhoneNumber.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberPhoneNumber);

            TableSchema.TableColumn colvarMemberFullname = new TableSchema.TableColumn(this);
            colvarMemberFullname.ColumnName = "MemberFullname";
            colvarMemberFullname.DataType = DbType.String;
            colvarMemberFullname.MaxLength = 50;
            colvarMemberFullname.AutoIncrement = false;
            colvarMemberFullname.IsNullable = true;
            colvarMemberFullname.IsPrimaryKey = false;
            colvarMemberFullname.IsForeignKey = false;
            colvarMemberFullname.IsReadOnly = false;

            colvarMemberFullname.DefaultSetting = @"";
            colvarMemberFullname.ForeignKeyTableName = "";
            colvarMemberFullname.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberFullname);

            TableSchema.TableColumn colvarCompanyName = new TableSchema.TableColumn(this);
            colvarCompanyName.ColumnName = "CompanyName";
            colvarCompanyName.DataType = DbType.String;
            colvarCompanyName.MaxLength = 50;
            colvarCompanyName.AutoIncrement = false;
            colvarCompanyName.IsNullable = true;
            colvarCompanyName.IsPrimaryKey = false;
            colvarCompanyName.IsForeignKey = false;
            colvarCompanyName.IsReadOnly = false;

            colvarCompanyName.DefaultSetting = @"";
            colvarCompanyName.ForeignKeyTableName = "";
            colvarCompanyName.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyName);

            TableSchema.TableColumn colvarMemberCompanyID = new TableSchema.TableColumn(this);
            colvarMemberCompanyID.ColumnName = "MemberCompanyID";
            colvarMemberCompanyID.DataType = DbType.Int32;
            colvarMemberCompanyID.MaxLength = 0;
            colvarMemberCompanyID.AutoIncrement = false;
            colvarMemberCompanyID.IsNullable = true;
            colvarMemberCompanyID.IsPrimaryKey = false;
            colvarMemberCompanyID.IsForeignKey = false;
            colvarMemberCompanyID.IsReadOnly = false;

            colvarMemberCompanyID.DefaultSetting = @"";
            colvarMemberCompanyID.ForeignKeyTableName = "";
            colvarMemberCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCompanyID);

            TableSchema.TableColumn colvarAdsDate = new TableSchema.TableColumn(this);
            colvarAdsDate.ColumnName = "AdsDate";
            colvarAdsDate.DataType = DbType.DateTime;
            colvarAdsDate.MaxLength = 0;
            colvarAdsDate.AutoIncrement = false;
            colvarAdsDate.IsNullable = true;
            colvarAdsDate.IsPrimaryKey = false;
            colvarAdsDate.IsForeignKey = false;
            colvarAdsDate.IsReadOnly = false;

            colvarAdsDate.DefaultSetting = @"";
            colvarAdsDate.ForeignKeyTableName = "";
            colvarAdsDate.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsDate);

            TableSchema.TableColumn colvarAdsEndDate = new TableSchema.TableColumn(this);
            colvarAdsEndDate.ColumnName = "AdsEndDate";
            colvarAdsEndDate.DataType = DbType.DateTime;
            colvarAdsEndDate.MaxLength = 0;
            colvarAdsEndDate.AutoIncrement = false;
            colvarAdsEndDate.IsNullable = true;
            colvarAdsEndDate.IsPrimaryKey = false;
            colvarAdsEndDate.IsForeignKey = false;
            colvarAdsEndDate.IsReadOnly = false;

            colvarAdsEndDate.DefaultSetting = @"";
            colvarAdsEndDate.ForeignKeyTableName = "";
            colvarAdsEndDate.ApplyExtendedProperties();
            this.Columns.Add(colvarAdsEndDate);
        }
예제 #6
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarMemberCompanyMemberID = new TableSchema.TableColumn(this);
            colvarMemberCompanyMemberID.ColumnName = "MemberCompany_MemberID";
            colvarMemberCompanyMemberID.DataType = DbType.Int32;
            colvarMemberCompanyMemberID.MaxLength = 0;
            colvarMemberCompanyMemberID.AutoIncrement = false;
            colvarMemberCompanyMemberID.IsNullable = true;
            colvarMemberCompanyMemberID.IsPrimaryKey = false;
            colvarMemberCompanyMemberID.IsForeignKey = false;
            colvarMemberCompanyMemberID.IsReadOnly = false;

            colvarMemberCompanyMemberID.DefaultSetting = @"";
            colvarMemberCompanyMemberID.ForeignKeyTableName = "";
            colvarMemberCompanyMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCompanyMemberID);

            TableSchema.TableColumn colvarMemberCompanyCompanyID = new TableSchema.TableColumn(this);
            colvarMemberCompanyCompanyID.ColumnName = "MemberCompany_CompanyID";
            colvarMemberCompanyCompanyID.DataType = DbType.Int32;
            colvarMemberCompanyCompanyID.MaxLength = 0;
            colvarMemberCompanyCompanyID.AutoIncrement = false;
            colvarMemberCompanyCompanyID.IsNullable = true;
            colvarMemberCompanyCompanyID.IsPrimaryKey = false;
            colvarMemberCompanyCompanyID.IsForeignKey = false;
            colvarMemberCompanyCompanyID.IsReadOnly = false;

            colvarMemberCompanyCompanyID.DefaultSetting = @"";
            colvarMemberCompanyCompanyID.ForeignKeyTableName = "";
            colvarMemberCompanyCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCompanyCompanyID);

            TableSchema.TableColumn colvarMemberCompanyDate = new TableSchema.TableColumn(this);
            colvarMemberCompanyDate.ColumnName = "MemberCompany_Date";
            colvarMemberCompanyDate.DataType = DbType.DateTime;
            colvarMemberCompanyDate.MaxLength = 0;
            colvarMemberCompanyDate.AutoIncrement = false;
            colvarMemberCompanyDate.IsNullable = true;
            colvarMemberCompanyDate.IsPrimaryKey = false;
            colvarMemberCompanyDate.IsForeignKey = false;
            colvarMemberCompanyDate.IsReadOnly = false;

            colvarMemberCompanyDate.DefaultSetting = @"";
            colvarMemberCompanyDate.ForeignKeyTableName = "";
            colvarMemberCompanyDate.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCompanyDate);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);

            TableSchema.TableColumn colvarMemberGrade = new TableSchema.TableColumn(this);
            colvarMemberGrade.ColumnName = "MemberGrade";
            colvarMemberGrade.DataType = DbType.Int32;
            colvarMemberGrade.MaxLength = 0;
            colvarMemberGrade.AutoIncrement = false;
            colvarMemberGrade.IsNullable = true;
            colvarMemberGrade.IsPrimaryKey = false;
            colvarMemberGrade.IsForeignKey = false;
            colvarMemberGrade.IsReadOnly = false;

            colvarMemberGrade.DefaultSetting = @"";
            colvarMemberGrade.ForeignKeyTableName = "";
            colvarMemberGrade.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberGrade);
        }
예제 #7
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarName = new TableSchema.TableColumn(this);
            colvarName.ColumnName = "Name";
            colvarName.DataType = DbType.String;
            colvarName.MaxLength = 250;
            colvarName.AutoIncrement = false;
            colvarName.IsNullable = true;
            colvarName.IsPrimaryKey = false;
            colvarName.IsForeignKey = false;
            colvarName.IsReadOnly = false;

            colvarName.DefaultSetting = @"";
            colvarName.ForeignKeyTableName = "";
            colvarName.ApplyExtendedProperties();
            this.Columns.Add(colvarName);

            TableSchema.TableColumn colvarPrice = new TableSchema.TableColumn(this);
            colvarPrice.ColumnName = "Price";
            colvarPrice.DataType = DbType.Decimal;
            colvarPrice.MaxLength = 0;
            colvarPrice.AutoIncrement = false;
            colvarPrice.IsNullable = true;
            colvarPrice.IsPrimaryKey = false;
            colvarPrice.IsForeignKey = false;
            colvarPrice.IsReadOnly = false;

            colvarPrice.DefaultSetting = @"";
            colvarPrice.ForeignKeyTableName = "";
            colvarPrice.ApplyExtendedProperties();
            this.Columns.Add(colvarPrice);

            TableSchema.TableColumn colvarDirID = new TableSchema.TableColumn(this);
            colvarDirID.ColumnName = "DirID";
            colvarDirID.DataType = DbType.Int32;
            colvarDirID.MaxLength = 0;
            colvarDirID.AutoIncrement = false;
            colvarDirID.IsNullable = true;
            colvarDirID.IsPrimaryKey = false;
            colvarDirID.IsForeignKey = false;
            colvarDirID.IsReadOnly = false;

            colvarDirID.DefaultSetting = @"";
            colvarDirID.ForeignKeyTableName = "";
            colvarDirID.ApplyExtendedProperties();
            this.Columns.Add(colvarDirID);

            TableSchema.TableColumn colvarCode = new TableSchema.TableColumn(this);
            colvarCode.ColumnName = "Code";
            colvarCode.DataType = DbType.String;
            colvarCode.MaxLength = 20;
            colvarCode.AutoIncrement = false;
            colvarCode.IsNullable = true;
            colvarCode.IsPrimaryKey = false;
            colvarCode.IsForeignKey = false;
            colvarCode.IsReadOnly = false;

            colvarCode.DefaultSetting = @"";
            colvarCode.ForeignKeyTableName = "";
            colvarCode.ApplyExtendedProperties();
            this.Columns.Add(colvarCode);

            TableSchema.TableColumn colvarCompanyID = new TableSchema.TableColumn(this);
            colvarCompanyID.ColumnName = "CompanyID";
            colvarCompanyID.DataType = DbType.Int32;
            colvarCompanyID.MaxLength = 0;
            colvarCompanyID.AutoIncrement = false;
            colvarCompanyID.IsNullable = true;
            colvarCompanyID.IsPrimaryKey = false;
            colvarCompanyID.IsForeignKey = false;
            colvarCompanyID.IsReadOnly = false;

            colvarCompanyID.DefaultSetting = @"";
            colvarCompanyID.ForeignKeyTableName = "";
            colvarCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyID);

            TableSchema.TableColumn colvarIsDeleted = new TableSchema.TableColumn(this);
            colvarIsDeleted.ColumnName = "IsDeleted";
            colvarIsDeleted.DataType = DbType.Boolean;
            colvarIsDeleted.MaxLength = 0;
            colvarIsDeleted.AutoIncrement = false;
            colvarIsDeleted.IsNullable = true;
            colvarIsDeleted.IsPrimaryKey = false;
            colvarIsDeleted.IsForeignKey = false;
            colvarIsDeleted.IsReadOnly = false;

            colvarIsDeleted.DefaultSetting = @"";
            colvarIsDeleted.ForeignKeyTableName = "";
            colvarIsDeleted.ApplyExtendedProperties();
            this.Columns.Add(colvarIsDeleted);

            TableSchema.TableColumn colvarIsOutOfStock = new TableSchema.TableColumn(this);
            colvarIsOutOfStock.ColumnName = "IsOutOfStock";
            colvarIsOutOfStock.DataType = DbType.Boolean;
            colvarIsOutOfStock.MaxLength = 0;
            colvarIsOutOfStock.AutoIncrement = false;
            colvarIsOutOfStock.IsNullable = true;
            colvarIsOutOfStock.IsPrimaryKey = false;
            colvarIsOutOfStock.IsForeignKey = false;
            colvarIsOutOfStock.IsReadOnly = false;

            colvarIsOutOfStock.DefaultSetting = @"";
            colvarIsOutOfStock.ForeignKeyTableName = "";
            colvarIsOutOfStock.ApplyExtendedProperties();
            this.Columns.Add(colvarIsOutOfStock);

            TableSchema.TableColumn colvarOutOfStockDate = new TableSchema.TableColumn(this);
            colvarOutOfStockDate.ColumnName = "OutOfStockDate";
            colvarOutOfStockDate.DataType = DbType.DateTime;
            colvarOutOfStockDate.MaxLength = 0;
            colvarOutOfStockDate.AutoIncrement = false;
            colvarOutOfStockDate.IsNullable = true;
            colvarOutOfStockDate.IsPrimaryKey = false;
            colvarOutOfStockDate.IsForeignKey = false;
            colvarOutOfStockDate.IsReadOnly = false;

            colvarOutOfStockDate.DefaultSetting = @"";
            colvarOutOfStockDate.ForeignKeyTableName = "";
            colvarOutOfStockDate.ApplyExtendedProperties();
            this.Columns.Add(colvarOutOfStockDate);
        }
예제 #8
0
파일: SysNoteSchema.cs 프로젝트: eleooo/App
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarNoteSubject = new TableSchema.TableColumn(this);
            colvarNoteSubject.ColumnName = "NoteSubject";
            colvarNoteSubject.DataType = DbType.String;
            colvarNoteSubject.MaxLength = 250;
            colvarNoteSubject.AutoIncrement = false;
            colvarNoteSubject.IsNullable = false;
            colvarNoteSubject.IsPrimaryKey = false;
            colvarNoteSubject.IsForeignKey = false;
            colvarNoteSubject.IsReadOnly = false;

            colvarNoteSubject.DefaultSetting = @"";
            colvarNoteSubject.ForeignKeyTableName = "";
            colvarNoteSubject.ApplyExtendedProperties();
            this.Columns.Add(colvarNoteSubject);

            TableSchema.TableColumn colvarNoteContent = new TableSchema.TableColumn(this);
            colvarNoteContent.ColumnName = "NoteContent";
            colvarNoteContent.DataType = DbType.String;
            colvarNoteContent.MaxLength = 1073741823;
            colvarNoteContent.AutoIncrement = false;
            colvarNoteContent.IsNullable = true;
            colvarNoteContent.IsPrimaryKey = false;
            colvarNoteContent.IsForeignKey = false;
            colvarNoteContent.IsReadOnly = false;

            colvarNoteContent.DefaultSetting = @"";
            colvarNoteContent.ForeignKeyTableName = "";
            colvarNoteContent.ApplyExtendedProperties();
            this.Columns.Add(colvarNoteContent);

            TableSchema.TableColumn colvarNoteDate = new TableSchema.TableColumn(this);
            colvarNoteDate.ColumnName = "NoteDate";
            colvarNoteDate.DataType = DbType.DateTime;
            colvarNoteDate.MaxLength = 0;
            colvarNoteDate.AutoIncrement = false;
            colvarNoteDate.IsNullable = true;
            colvarNoteDate.IsPrimaryKey = false;
            colvarNoteDate.IsForeignKey = false;
            colvarNoteDate.IsReadOnly = false;

            colvarNoteDate.DefaultSetting = @"";
            colvarNoteDate.ForeignKeyTableName = "";
            colvarNoteDate.ApplyExtendedProperties();
            this.Columns.Add(colvarNoteDate);

            TableSchema.TableColumn colvarNoteStatus = new TableSchema.TableColumn(this);
            colvarNoteStatus.ColumnName = "NoteStatus";
            colvarNoteStatus.DataType = DbType.Int32;
            colvarNoteStatus.MaxLength = 0;
            colvarNoteStatus.AutoIncrement = false;
            colvarNoteStatus.IsNullable = false;
            colvarNoteStatus.IsPrimaryKey = false;
            colvarNoteStatus.IsForeignKey = false;
            colvarNoteStatus.IsReadOnly = false;

            colvarNoteStatus.DefaultSetting = @"";
            colvarNoteStatus.ForeignKeyTableName = "";
            colvarNoteStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarNoteStatus);

            TableSchema.TableColumn colvarNoteHots = new TableSchema.TableColumn(this);
            colvarNoteHots.ColumnName = "NoteHots";
            colvarNoteHots.DataType = DbType.Int32;
            colvarNoteHots.MaxLength = 0;
            colvarNoteHots.AutoIncrement = false;
            colvarNoteHots.IsNullable = false;
            colvarNoteHots.IsPrimaryKey = false;
            colvarNoteHots.IsForeignKey = false;
            colvarNoteHots.IsReadOnly = false;

            colvarNoteHots.DefaultSetting = @"";
            colvarNoteHots.ForeignKeyTableName = "";
            colvarNoteHots.ApplyExtendedProperties();
            this.Columns.Add(colvarNoteHots);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #9
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarCashID = new TableSchema.TableColumn(this);
            colvarCashID.ColumnName = "CashID";
            colvarCashID.DataType = DbType.Int32;
            colvarCashID.MaxLength = 0;
            colvarCashID.AutoIncrement = false;
            colvarCashID.IsNullable = false;
            colvarCashID.IsPrimaryKey = false;
            colvarCashID.IsForeignKey = false;
            colvarCashID.IsReadOnly = false;

            colvarCashID.DefaultSetting = @"";
            colvarCashID.ForeignKeyTableName = "";
            colvarCashID.ApplyExtendedProperties();
            this.Columns.Add(colvarCashID);

            TableSchema.TableColumn colvarCashDate = new TableSchema.TableColumn(this);
            colvarCashDate.ColumnName = "CashDate";
            colvarCashDate.DataType = DbType.DateTime;
            colvarCashDate.MaxLength = 0;
            colvarCashDate.AutoIncrement = false;
            colvarCashDate.IsNullable = true;
            colvarCashDate.IsPrimaryKey = false;
            colvarCashDate.IsForeignKey = false;
            colvarCashDate.IsReadOnly = false;

            colvarCashDate.DefaultSetting = @"";
            colvarCashDate.ForeignKeyTableName = "";
            colvarCashDate.ApplyExtendedProperties();
            this.Columns.Add(colvarCashDate);

            TableSchema.TableColumn colvarCashMemberID = new TableSchema.TableColumn(this);
            colvarCashMemberID.ColumnName = "CashMemberID";
            colvarCashMemberID.DataType = DbType.Int32;
            colvarCashMemberID.MaxLength = 0;
            colvarCashMemberID.AutoIncrement = false;
            colvarCashMemberID.IsNullable = true;
            colvarCashMemberID.IsPrimaryKey = false;
            colvarCashMemberID.IsForeignKey = false;
            colvarCashMemberID.IsReadOnly = false;

            colvarCashMemberID.DefaultSetting = @"";
            colvarCashMemberID.ForeignKeyTableName = "";
            colvarCashMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarCashMemberID);

            TableSchema.TableColumn colvarCashCompanyID = new TableSchema.TableColumn(this);
            colvarCashCompanyID.ColumnName = "CashCompanyID";
            colvarCashCompanyID.DataType = DbType.Int32;
            colvarCashCompanyID.MaxLength = 0;
            colvarCashCompanyID.AutoIncrement = false;
            colvarCashCompanyID.IsNullable = true;
            colvarCashCompanyID.IsPrimaryKey = false;
            colvarCashCompanyID.IsForeignKey = false;
            colvarCashCompanyID.IsReadOnly = false;

            colvarCashCompanyID.DefaultSetting = @"";
            colvarCashCompanyID.ForeignKeyTableName = "";
            colvarCashCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarCashCompanyID);

            TableSchema.TableColumn colvarCashOrderID = new TableSchema.TableColumn(this);
            colvarCashOrderID.ColumnName = "CashOrderID";
            colvarCashOrderID.DataType = DbType.Int32;
            colvarCashOrderID.MaxLength = 0;
            colvarCashOrderID.AutoIncrement = false;
            colvarCashOrderID.IsNullable = true;
            colvarCashOrderID.IsPrimaryKey = false;
            colvarCashOrderID.IsForeignKey = false;
            colvarCashOrderID.IsReadOnly = false;

            colvarCashOrderID.DefaultSetting = @"";
            colvarCashOrderID.ForeignKeyTableName = "";
            colvarCashOrderID.ApplyExtendedProperties();
            this.Columns.Add(colvarCashOrderID);

            TableSchema.TableColumn colvarCashSum = new TableSchema.TableColumn(this);
            colvarCashSum.ColumnName = "CashSum";
            colvarCashSum.DataType = DbType.Decimal;
            colvarCashSum.MaxLength = 0;
            colvarCashSum.AutoIncrement = false;
            colvarCashSum.IsNullable = true;
            colvarCashSum.IsPrimaryKey = false;
            colvarCashSum.IsForeignKey = false;
            colvarCashSum.IsReadOnly = false;

            colvarCashSum.DefaultSetting = @"";
            colvarCashSum.ForeignKeyTableName = "";
            colvarCashSum.ApplyExtendedProperties();
            this.Columns.Add(colvarCashSum);

            TableSchema.TableColumn colvarCashRate = new TableSchema.TableColumn(this);
            colvarCashRate.ColumnName = "CashRate";
            colvarCashRate.DataType = DbType.Decimal;
            colvarCashRate.MaxLength = 0;
            colvarCashRate.AutoIncrement = false;
            colvarCashRate.IsNullable = true;
            colvarCashRate.IsPrimaryKey = false;
            colvarCashRate.IsForeignKey = false;
            colvarCashRate.IsReadOnly = false;

            colvarCashRate.DefaultSetting = @"";
            colvarCashRate.ForeignKeyTableName = "";
            colvarCashRate.ApplyExtendedProperties();
            this.Columns.Add(colvarCashRate);

            TableSchema.TableColumn colvarCashPoint = new TableSchema.TableColumn(this);
            colvarCashPoint.ColumnName = "CashPoint";
            colvarCashPoint.DataType = DbType.Decimal;
            colvarCashPoint.MaxLength = 0;
            colvarCashPoint.AutoIncrement = false;
            colvarCashPoint.IsNullable = true;
            colvarCashPoint.IsPrimaryKey = false;
            colvarCashPoint.IsForeignKey = false;
            colvarCashPoint.IsReadOnly = false;

            colvarCashPoint.DefaultSetting = @"";
            colvarCashPoint.ForeignKeyTableName = "";
            colvarCashPoint.ApplyExtendedProperties();
            this.Columns.Add(colvarCashPoint);

            TableSchema.TableColumn colvarCashMemo = new TableSchema.TableColumn(this);
            colvarCashMemo.ColumnName = "CashMemo";
            colvarCashMemo.DataType = DbType.String;
            colvarCashMemo.MaxLength = 50;
            colvarCashMemo.AutoIncrement = false;
            colvarCashMemo.IsNullable = true;
            colvarCashMemo.IsPrimaryKey = false;
            colvarCashMemo.IsForeignKey = false;
            colvarCashMemo.IsReadOnly = false;

            colvarCashMemo.DefaultSetting = @"";
            colvarCashMemo.ForeignKeyTableName = "";
            colvarCashMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarCashMemo);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #10
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarAreaID = new TableSchema.TableColumn(this);
            colvarAreaID.ColumnName = "AreaID";
            colvarAreaID.DataType = DbType.Int32;
            colvarAreaID.MaxLength = 0;
            colvarAreaID.AutoIncrement = false;
            colvarAreaID.IsNullable = true;
            colvarAreaID.IsPrimaryKey = false;
            colvarAreaID.IsForeignKey = false;
            colvarAreaID.IsReadOnly = false;

            colvarAreaID.DefaultSetting = @"";
            colvarAreaID.ForeignKeyTableName = "";
            colvarAreaID.ApplyExtendedProperties();
            this.Columns.Add(colvarAreaID);

            TableSchema.TableColumn colvarName = new TableSchema.TableColumn(this);
            colvarName.ColumnName = "Name";
            colvarName.DataType = DbType.String;
            colvarName.MaxLength = 250;
            colvarName.AutoIncrement = false;
            colvarName.IsNullable = true;
            colvarName.IsPrimaryKey = false;
            colvarName.IsForeignKey = false;
            colvarName.IsReadOnly = false;

            colvarName.DefaultSetting = @"";
            colvarName.ForeignKeyTableName = "";
            colvarName.ApplyExtendedProperties();
            this.Columns.Add(colvarName);

            TableSchema.TableColumn colvarAreaDepth = new TableSchema.TableColumn(this);
            colvarAreaDepth.ColumnName = "AreaDepth";
            colvarAreaDepth.DataType = DbType.String;
            colvarAreaDepth.MaxLength = 50;
            colvarAreaDepth.AutoIncrement = false;
            colvarAreaDepth.IsNullable = true;
            colvarAreaDepth.IsPrimaryKey = false;
            colvarAreaDepth.IsForeignKey = false;
            colvarAreaDepth.IsReadOnly = false;

            colvarAreaDepth.DefaultSetting = @"";
            colvarAreaDepth.ForeignKeyTableName = "";
            colvarAreaDepth.ApplyExtendedProperties();
            this.Columns.Add(colvarAreaDepth);

            TableSchema.TableColumn colvarCode = new TableSchema.TableColumn(this);
            colvarCode.ColumnName = "Code";
            colvarCode.DataType = DbType.String;
            colvarCode.MaxLength = 50;
            colvarCode.AutoIncrement = false;
            colvarCode.IsNullable = true;
            colvarCode.IsPrimaryKey = false;
            colvarCode.IsForeignKey = false;
            colvarCode.IsReadOnly = false;

            colvarCode.DefaultSetting = @"";
            colvarCode.ForeignKeyTableName = "";
            colvarCode.ApplyExtendedProperties();
            this.Columns.Add(colvarCode);

            TableSchema.TableColumn colvarAddress = new TableSchema.TableColumn(this);
            colvarAddress.ColumnName = "Address";
            colvarAddress.DataType = DbType.String;
            colvarAddress.MaxLength = 250;
            colvarAddress.AutoIncrement = false;
            colvarAddress.IsNullable = true;
            colvarAddress.IsPrimaryKey = false;
            colvarAddress.IsForeignKey = false;
            colvarAddress.IsReadOnly = false;

            colvarAddress.DefaultSetting = @"";
            colvarAddress.ForeignKeyTableName = "";
            colvarAddress.ApplyExtendedProperties();
            this.Columns.Add(colvarAddress);
        }
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("APR_PercentilesPesoEstatura", TableType.Table, DataService.GetInstance("sicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "id";
                colvarId.DataType            = DbType.Int32;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarSexo = new TableSchema.TableColumn(schema);
                colvarSexo.ColumnName          = "Sexo";
                colvarSexo.DataType            = DbType.Int32;
                colvarSexo.MaxLength           = 0;
                colvarSexo.AutoIncrement       = false;
                colvarSexo.IsNullable          = false;
                colvarSexo.IsPrimaryKey        = false;
                colvarSexo.IsForeignKey        = false;
                colvarSexo.IsReadOnly          = false;
                colvarSexo.DefaultSetting      = @"";
                colvarSexo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSexo);

                TableSchema.TableColumn colvarEstatura = new TableSchema.TableColumn(schema);
                colvarEstatura.ColumnName          = "Estatura";
                colvarEstatura.DataType            = DbType.Decimal;
                colvarEstatura.MaxLength           = 0;
                colvarEstatura.AutoIncrement       = false;
                colvarEstatura.IsNullable          = false;
                colvarEstatura.IsPrimaryKey        = false;
                colvarEstatura.IsForeignKey        = false;
                colvarEstatura.IsReadOnly          = false;
                colvarEstatura.DefaultSetting      = @"";
                colvarEstatura.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEstatura);

                TableSchema.TableColumn colvarP1 = new TableSchema.TableColumn(schema);
                colvarP1.ColumnName          = "P1";
                colvarP1.DataType            = DbType.Decimal;
                colvarP1.MaxLength           = 0;
                colvarP1.AutoIncrement       = false;
                colvarP1.IsNullable          = false;
                colvarP1.IsPrimaryKey        = false;
                colvarP1.IsForeignKey        = false;
                colvarP1.IsReadOnly          = false;
                colvarP1.DefaultSetting      = @"";
                colvarP1.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP1);

                TableSchema.TableColumn colvarP3 = new TableSchema.TableColumn(schema);
                colvarP3.ColumnName          = "P3";
                colvarP3.DataType            = DbType.Decimal;
                colvarP3.MaxLength           = 0;
                colvarP3.AutoIncrement       = false;
                colvarP3.IsNullable          = false;
                colvarP3.IsPrimaryKey        = false;
                colvarP3.IsForeignKey        = false;
                colvarP3.IsReadOnly          = false;
                colvarP3.DefaultSetting      = @"";
                colvarP3.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP3);

                TableSchema.TableColumn colvarP15 = new TableSchema.TableColumn(schema);
                colvarP15.ColumnName          = "P15";
                colvarP15.DataType            = DbType.Decimal;
                colvarP15.MaxLength           = 0;
                colvarP15.AutoIncrement       = false;
                colvarP15.IsNullable          = false;
                colvarP15.IsPrimaryKey        = false;
                colvarP15.IsForeignKey        = false;
                colvarP15.IsReadOnly          = false;
                colvarP15.DefaultSetting      = @"";
                colvarP15.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP15);

                TableSchema.TableColumn colvarP50 = new TableSchema.TableColumn(schema);
                colvarP50.ColumnName          = "P50";
                colvarP50.DataType            = DbType.Decimal;
                colvarP50.MaxLength           = 0;
                colvarP50.AutoIncrement       = false;
                colvarP50.IsNullable          = false;
                colvarP50.IsPrimaryKey        = false;
                colvarP50.IsForeignKey        = false;
                colvarP50.IsReadOnly          = false;
                colvarP50.DefaultSetting      = @"";
                colvarP50.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP50);

                TableSchema.TableColumn colvarP85 = new TableSchema.TableColumn(schema);
                colvarP85.ColumnName          = "P85";
                colvarP85.DataType            = DbType.Decimal;
                colvarP85.MaxLength           = 0;
                colvarP85.AutoIncrement       = false;
                colvarP85.IsNullable          = false;
                colvarP85.IsPrimaryKey        = false;
                colvarP85.IsForeignKey        = false;
                colvarP85.IsReadOnly          = false;
                colvarP85.DefaultSetting      = @"";
                colvarP85.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP85);

                TableSchema.TableColumn colvarP97 = new TableSchema.TableColumn(schema);
                colvarP97.ColumnName          = "P97";
                colvarP97.DataType            = DbType.Decimal;
                colvarP97.MaxLength           = 0;
                colvarP97.AutoIncrement       = false;
                colvarP97.IsNullable          = false;
                colvarP97.IsPrimaryKey        = false;
                colvarP97.IsForeignKey        = false;
                colvarP97.IsReadOnly          = false;
                colvarP97.DefaultSetting      = @"";
                colvarP97.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP97);

                TableSchema.TableColumn colvarP99 = new TableSchema.TableColumn(schema);
                colvarP99.ColumnName          = "P99";
                colvarP99.DataType            = DbType.Decimal;
                colvarP99.MaxLength           = 0;
                colvarP99.AutoIncrement       = false;
                colvarP99.IsNullable          = false;
                colvarP99.IsPrimaryKey        = false;
                colvarP99.IsForeignKey        = false;
                colvarP99.IsReadOnly          = false;
                colvarP99.DefaultSetting      = @"";
                colvarP99.ForeignKeyTableName = "";
                schema.Columns.Add(colvarP99);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["sicProvider"].AddSchema("APR_PercentilesPesoEstatura", schema);
            }
        }
예제 #12
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("vw_Client", TableType.View, DataService.GetInstance("SubsonicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarClientId = new TableSchema.TableColumn(schema);
                colvarClientId.ColumnName    = "ClientId";
                colvarClientId.DataType      = DbType.Int32;
                colvarClientId.MaxLength     = 0;
                colvarClientId.AutoIncrement = false;
                colvarClientId.IsNullable    = false;
                colvarClientId.IsPrimaryKey  = false;
                colvarClientId.IsForeignKey  = false;
                colvarClientId.IsReadOnly    = false;

                schema.Columns.Add(colvarClientId);

                TableSchema.TableColumn colvarClientName = new TableSchema.TableColumn(schema);
                colvarClientName.ColumnName    = "ClientName";
                colvarClientName.DataType      = DbType.String;
                colvarClientName.MaxLength     = 50;
                colvarClientName.AutoIncrement = false;
                colvarClientName.IsNullable    = true;
                colvarClientName.IsPrimaryKey  = false;
                colvarClientName.IsForeignKey  = false;
                colvarClientName.IsReadOnly    = false;

                schema.Columns.Add(colvarClientName);

                TableSchema.TableColumn colvarClientLevelId = new TableSchema.TableColumn(schema);
                colvarClientLevelId.ColumnName    = "ClientLevelId";
                colvarClientLevelId.DataType      = DbType.Int32;
                colvarClientLevelId.MaxLength     = 0;
                colvarClientLevelId.AutoIncrement = false;
                colvarClientLevelId.IsNullable    = true;
                colvarClientLevelId.IsPrimaryKey  = false;
                colvarClientLevelId.IsForeignKey  = false;
                colvarClientLevelId.IsReadOnly    = false;

                schema.Columns.Add(colvarClientLevelId);

                TableSchema.TableColumn colvarAddress = new TableSchema.TableColumn(schema);
                colvarAddress.ColumnName    = "Address";
                colvarAddress.DataType      = DbType.String;
                colvarAddress.MaxLength     = 50;
                colvarAddress.AutoIncrement = false;
                colvarAddress.IsNullable    = true;
                colvarAddress.IsPrimaryKey  = false;
                colvarAddress.IsForeignKey  = false;
                colvarAddress.IsReadOnly    = false;

                schema.Columns.Add(colvarAddress);

                TableSchema.TableColumn colvarTelephone = new TableSchema.TableColumn(schema);
                colvarTelephone.ColumnName    = "Telephone";
                colvarTelephone.DataType      = DbType.String;
                colvarTelephone.MaxLength     = 50;
                colvarTelephone.AutoIncrement = false;
                colvarTelephone.IsNullable    = true;
                colvarTelephone.IsPrimaryKey  = false;
                colvarTelephone.IsForeignKey  = false;
                colvarTelephone.IsReadOnly    = false;

                schema.Columns.Add(colvarTelephone);

                TableSchema.TableColumn colvarMailNo = new TableSchema.TableColumn(schema);
                colvarMailNo.ColumnName    = "MailNo";
                colvarMailNo.DataType      = DbType.String;
                colvarMailNo.MaxLength     = 50;
                colvarMailNo.AutoIncrement = false;
                colvarMailNo.IsNullable    = true;
                colvarMailNo.IsPrimaryKey  = false;
                colvarMailNo.IsForeignKey  = false;
                colvarMailNo.IsReadOnly    = false;

                schema.Columns.Add(colvarMailNo);

                TableSchema.TableColumn colvarFax = new TableSchema.TableColumn(schema);
                colvarFax.ColumnName    = "Fax";
                colvarFax.DataType      = DbType.String;
                colvarFax.MaxLength     = 50;
                colvarFax.AutoIncrement = false;
                colvarFax.IsNullable    = true;
                colvarFax.IsPrimaryKey  = false;
                colvarFax.IsForeignKey  = false;
                colvarFax.IsReadOnly    = false;

                schema.Columns.Add(colvarFax);

                TableSchema.TableColumn colvarEmployeeId = new TableSchema.TableColumn(schema);
                colvarEmployeeId.ColumnName    = "EmployeeId";
                colvarEmployeeId.DataType      = DbType.Int32;
                colvarEmployeeId.MaxLength     = 0;
                colvarEmployeeId.AutoIncrement = false;
                colvarEmployeeId.IsNullable    = false;
                colvarEmployeeId.IsPrimaryKey  = false;
                colvarEmployeeId.IsForeignKey  = false;
                colvarEmployeeId.IsReadOnly    = false;

                schema.Columns.Add(colvarEmployeeId);

                TableSchema.TableColumn colvarClientTypeId = new TableSchema.TableColumn(schema);
                colvarClientTypeId.ColumnName    = "ClientTypeId";
                colvarClientTypeId.DataType      = DbType.Int32;
                colvarClientTypeId.MaxLength     = 0;
                colvarClientTypeId.AutoIncrement = false;
                colvarClientTypeId.IsNullable    = true;
                colvarClientTypeId.IsPrimaryKey  = false;
                colvarClientTypeId.IsForeignKey  = false;
                colvarClientTypeId.IsReadOnly    = false;

                schema.Columns.Add(colvarClientTypeId);

                TableSchema.TableColumn colvarSheetNum = new TableSchema.TableColumn(schema);
                colvarSheetNum.ColumnName    = "SheetNum";
                colvarSheetNum.DataType      = DbType.String;
                colvarSheetNum.MaxLength     = 50;
                colvarSheetNum.AutoIncrement = false;
                colvarSheetNum.IsNullable    = true;
                colvarSheetNum.IsPrimaryKey  = false;
                colvarSheetNum.IsForeignKey  = false;
                colvarSheetNum.IsReadOnly    = false;

                schema.Columns.Add(colvarSheetNum);

                TableSchema.TableColumn colvarClientLevelName = new TableSchema.TableColumn(schema);
                colvarClientLevelName.ColumnName    = "ClientLevelName";
                colvarClientLevelName.DataType      = DbType.String;
                colvarClientLevelName.MaxLength     = 50;
                colvarClientLevelName.AutoIncrement = false;
                colvarClientLevelName.IsNullable    = true;
                colvarClientLevelName.IsPrimaryKey  = false;
                colvarClientLevelName.IsForeignKey  = false;
                colvarClientLevelName.IsReadOnly    = false;

                schema.Columns.Add(colvarClientLevelName);


                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["SubsonicProvider"].AddSchema("vw_Client", schema);
            }
        }
예제 #13
0
파일: File.cs 프로젝트: xingfudaiyan/OA
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("File_tb", TableType.Table, DataService.GetInstance("SubsonicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarFileId = new TableSchema.TableColumn(schema);
                colvarFileId.ColumnName          = "FileId";
                colvarFileId.DataType            = DbType.Int32;
                colvarFileId.MaxLength           = 0;
                colvarFileId.AutoIncrement       = true;
                colvarFileId.IsNullable          = false;
                colvarFileId.IsPrimaryKey        = true;
                colvarFileId.IsForeignKey        = false;
                colvarFileId.IsReadOnly          = false;
                colvarFileId.DefaultSetting      = @"";
                colvarFileId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFileId);

                TableSchema.TableColumn colvarFileTypeId = new TableSchema.TableColumn(schema);
                colvarFileTypeId.ColumnName     = "FileTypeId";
                colvarFileTypeId.DataType       = DbType.Int32;
                colvarFileTypeId.MaxLength      = 0;
                colvarFileTypeId.AutoIncrement  = false;
                colvarFileTypeId.IsNullable     = false;
                colvarFileTypeId.IsPrimaryKey   = false;
                colvarFileTypeId.IsForeignKey   = true;
                colvarFileTypeId.IsReadOnly     = false;
                colvarFileTypeId.DefaultSetting = @"";

                colvarFileTypeId.ForeignKeyTableName = "FileType_tb";
                schema.Columns.Add(colvarFileTypeId);

                TableSchema.TableColumn colvarFileName = new TableSchema.TableColumn(schema);
                colvarFileName.ColumnName          = "FileName";
                colvarFileName.DataType            = DbType.String;
                colvarFileName.MaxLength           = 50;
                colvarFileName.AutoIncrement       = false;
                colvarFileName.IsNullable          = false;
                colvarFileName.IsPrimaryKey        = false;
                colvarFileName.IsForeignKey        = false;
                colvarFileName.IsReadOnly          = false;
                colvarFileName.DefaultSetting      = @"";
                colvarFileName.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFileName);

                TableSchema.TableColumn colvarSendEmployeeId = new TableSchema.TableColumn(schema);
                colvarSendEmployeeId.ColumnName     = "SendEmployeeId";
                colvarSendEmployeeId.DataType       = DbType.Int32;
                colvarSendEmployeeId.MaxLength      = 0;
                colvarSendEmployeeId.AutoIncrement  = false;
                colvarSendEmployeeId.IsNullable     = false;
                colvarSendEmployeeId.IsPrimaryKey   = false;
                colvarSendEmployeeId.IsForeignKey   = true;
                colvarSendEmployeeId.IsReadOnly     = false;
                colvarSendEmployeeId.DefaultSetting = @"";

                colvarSendEmployeeId.ForeignKeyTableName = "Employee_tb";
                schema.Columns.Add(colvarSendEmployeeId);

                TableSchema.TableColumn colvarRecvEmployeeId = new TableSchema.TableColumn(schema);
                colvarRecvEmployeeId.ColumnName          = "RecvEmployeeId";
                colvarRecvEmployeeId.DataType            = DbType.Int32;
                colvarRecvEmployeeId.MaxLength           = 0;
                colvarRecvEmployeeId.AutoIncrement       = false;
                colvarRecvEmployeeId.IsNullable          = true;
                colvarRecvEmployeeId.IsPrimaryKey        = false;
                colvarRecvEmployeeId.IsForeignKey        = false;
                colvarRecvEmployeeId.IsReadOnly          = false;
                colvarRecvEmployeeId.DefaultSetting      = @"";
                colvarRecvEmployeeId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarRecvEmployeeId);

                TableSchema.TableColumn colvarSendTime = new TableSchema.TableColumn(schema);
                colvarSendTime.ColumnName          = "SendTime";
                colvarSendTime.DataType            = DbType.DateTime;
                colvarSendTime.MaxLength           = 0;
                colvarSendTime.AutoIncrement       = false;
                colvarSendTime.IsNullable          = false;
                colvarSendTime.IsPrimaryKey        = false;
                colvarSendTime.IsForeignKey        = false;
                colvarSendTime.IsReadOnly          = false;
                colvarSendTime.DefaultSetting      = @"";
                colvarSendTime.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSendTime);

                TableSchema.TableColumn colvarMemo = new TableSchema.TableColumn(schema);
                colvarMemo.ColumnName          = "Memo";
                colvarMemo.DataType            = DbType.String;
                colvarMemo.MaxLength           = -1;
                colvarMemo.AutoIncrement       = false;
                colvarMemo.IsNullable          = true;
                colvarMemo.IsPrimaryKey        = false;
                colvarMemo.IsForeignKey        = false;
                colvarMemo.IsReadOnly          = false;
                colvarMemo.DefaultSetting      = @"";
                colvarMemo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarMemo);

                TableSchema.TableColumn colvarIsCommon = new TableSchema.TableColumn(schema);
                colvarIsCommon.ColumnName          = "IsCommon";
                colvarIsCommon.DataType            = DbType.Int32;
                colvarIsCommon.MaxLength           = 0;
                colvarIsCommon.AutoIncrement       = false;
                colvarIsCommon.IsNullable          = true;
                colvarIsCommon.IsPrimaryKey        = false;
                colvarIsCommon.IsForeignKey        = false;
                colvarIsCommon.IsReadOnly          = false;
                colvarIsCommon.DefaultSetting      = @"";
                colvarIsCommon.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIsCommon);

                TableSchema.TableColumn colvarIsDelete = new TableSchema.TableColumn(schema);
                colvarIsDelete.ColumnName          = "IsDelete";
                colvarIsDelete.DataType            = DbType.Int32;
                colvarIsDelete.MaxLength           = 0;
                colvarIsDelete.AutoIncrement       = false;
                colvarIsDelete.IsNullable          = true;
                colvarIsDelete.IsPrimaryKey        = false;
                colvarIsDelete.IsForeignKey        = false;
                colvarIsDelete.IsReadOnly          = false;
                colvarIsDelete.DefaultSetting      = @"";
                colvarIsDelete.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIsDelete);

                TableSchema.TableColumn colvarIsMsg = new TableSchema.TableColumn(schema);
                colvarIsMsg.ColumnName          = "IsMsg";
                colvarIsMsg.DataType            = DbType.Int32;
                colvarIsMsg.MaxLength           = 0;
                colvarIsMsg.AutoIncrement       = false;
                colvarIsMsg.IsNullable          = true;
                colvarIsMsg.IsPrimaryKey        = false;
                colvarIsMsg.IsForeignKey        = false;
                colvarIsMsg.IsReadOnly          = false;
                colvarIsMsg.DefaultSetting      = @"";
                colvarIsMsg.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIsMsg);

                TableSchema.TableColumn colvarFilePermissionId = new TableSchema.TableColumn(schema);
                colvarFilePermissionId.ColumnName          = "FilePermissionId";
                colvarFilePermissionId.DataType            = DbType.Int32;
                colvarFilePermissionId.MaxLength           = 0;
                colvarFilePermissionId.AutoIncrement       = false;
                colvarFilePermissionId.IsNullable          = true;
                colvarFilePermissionId.IsPrimaryKey        = false;
                colvarFilePermissionId.IsForeignKey        = false;
                colvarFilePermissionId.IsReadOnly          = false;
                colvarFilePermissionId.DefaultSetting      = @"";
                colvarFilePermissionId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFilePermissionId);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["SubsonicProvider"].AddSchema("File_tb", schema);
            }
        }
예제 #14
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("APR_PartoProvisorio", TableType.Table, DataService.GetInstance("sicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdParto = new TableSchema.TableColumn(schema);
                colvarIdParto.ColumnName          = "idParto";
                colvarIdParto.DataType            = DbType.Int32;
                colvarIdParto.MaxLength           = 0;
                colvarIdParto.AutoIncrement       = true;
                colvarIdParto.IsNullable          = false;
                colvarIdParto.IsPrimaryKey        = true;
                colvarIdParto.IsForeignKey        = false;
                colvarIdParto.IsReadOnly          = false;
                colvarIdParto.DefaultSetting      = @"";
                colvarIdParto.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdParto);

                TableSchema.TableColumn colvarIdEfectorParto = new TableSchema.TableColumn(schema);
                colvarIdEfectorParto.ColumnName     = "idEfectorParto";
                colvarIdEfectorParto.DataType       = DbType.Int32;
                colvarIdEfectorParto.MaxLength      = 0;
                colvarIdEfectorParto.AutoIncrement  = false;
                colvarIdEfectorParto.IsNullable     = true;
                colvarIdEfectorParto.IsPrimaryKey   = false;
                colvarIdEfectorParto.IsForeignKey   = true;
                colvarIdEfectorParto.IsReadOnly     = false;
                colvarIdEfectorParto.DefaultSetting = @"";

                colvarIdEfectorParto.ForeignKeyTableName = "Sys_Efector";
                schema.Columns.Add(colvarIdEfectorParto);

                TableSchema.TableColumn colvarIdPaciente = new TableSchema.TableColumn(schema);
                colvarIdPaciente.ColumnName          = "idPaciente";
                colvarIdPaciente.DataType            = DbType.Int32;
                colvarIdPaciente.MaxLength           = 0;
                colvarIdPaciente.AutoIncrement       = false;
                colvarIdPaciente.IsNullable          = false;
                colvarIdPaciente.IsPrimaryKey        = false;
                colvarIdPaciente.IsForeignKey        = false;
                colvarIdPaciente.IsReadOnly          = false;
                colvarIdPaciente.DefaultSetting      = @"";
                colvarIdPaciente.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdPaciente);

                TableSchema.TableColumn colvarIdHistoriaClinicaPerinatal = new TableSchema.TableColumn(schema);
                colvarIdHistoriaClinicaPerinatal.ColumnName     = "idHistoriaClinicaPerinatal";
                colvarIdHistoriaClinicaPerinatal.DataType       = DbType.Int32;
                colvarIdHistoriaClinicaPerinatal.MaxLength      = 0;
                colvarIdHistoriaClinicaPerinatal.AutoIncrement  = false;
                colvarIdHistoriaClinicaPerinatal.IsNullable     = true;
                colvarIdHistoriaClinicaPerinatal.IsPrimaryKey   = false;
                colvarIdHistoriaClinicaPerinatal.IsForeignKey   = true;
                colvarIdHistoriaClinicaPerinatal.IsReadOnly     = false;
                colvarIdHistoriaClinicaPerinatal.DefaultSetting = @"";

                colvarIdHistoriaClinicaPerinatal.ForeignKeyTableName = "APR_HistoriaClinicaPerinatal";
                schema.Columns.Add(colvarIdHistoriaClinicaPerinatal);

                TableSchema.TableColumn colvarParto = new TableSchema.TableColumn(schema);
                colvarParto.ColumnName    = "parto";
                colvarParto.DataType      = DbType.Boolean;
                colvarParto.MaxLength     = 0;
                colvarParto.AutoIncrement = false;
                colvarParto.IsNullable    = true;
                colvarParto.IsPrimaryKey  = false;
                colvarParto.IsForeignKey  = false;
                colvarParto.IsReadOnly    = false;

                colvarParto.DefaultSetting      = @"((1))";
                colvarParto.ForeignKeyTableName = "";
                schema.Columns.Add(colvarParto);

                TableSchema.TableColumn colvarFechaNacimiento = new TableSchema.TableColumn(schema);
                colvarFechaNacimiento.ColumnName          = "fechaNacimiento";
                colvarFechaNacimiento.DataType            = DbType.DateTime;
                colvarFechaNacimiento.MaxLength           = 0;
                colvarFechaNacimiento.AutoIncrement       = false;
                colvarFechaNacimiento.IsNullable          = true;
                colvarFechaNacimiento.IsPrimaryKey        = false;
                colvarFechaNacimiento.IsForeignKey        = false;
                colvarFechaNacimiento.IsReadOnly          = false;
                colvarFechaNacimiento.DefaultSetting      = @"";
                colvarFechaNacimiento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaNacimiento);

                TableSchema.TableColumn colvarIdTerminacionParto = new TableSchema.TableColumn(schema);
                colvarIdTerminacionParto.ColumnName     = "idTerminacionParto";
                colvarIdTerminacionParto.DataType       = DbType.Int32;
                colvarIdTerminacionParto.MaxLength      = 0;
                colvarIdTerminacionParto.AutoIncrement  = false;
                colvarIdTerminacionParto.IsNullable     = true;
                colvarIdTerminacionParto.IsPrimaryKey   = false;
                colvarIdTerminacionParto.IsForeignKey   = true;
                colvarIdTerminacionParto.IsReadOnly     = false;
                colvarIdTerminacionParto.DefaultSetting = @"";

                colvarIdTerminacionParto.ForeignKeyTableName = "APR_TipoParto";
                schema.Columns.Add(colvarIdTerminacionParto);

                TableSchema.TableColumn colvarEdadGestacional = new TableSchema.TableColumn(schema);
                colvarEdadGestacional.ColumnName          = "edadGestacional";
                colvarEdadGestacional.DataType            = DbType.Decimal;
                colvarEdadGestacional.MaxLength           = 0;
                colvarEdadGestacional.AutoIncrement       = false;
                colvarEdadGestacional.IsNullable          = true;
                colvarEdadGestacional.IsPrimaryKey        = false;
                colvarEdadGestacional.IsForeignKey        = false;
                colvarEdadGestacional.IsReadOnly          = false;
                colvarEdadGestacional.DefaultSetting      = @"";
                colvarEdadGestacional.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEdadGestacional);

                TableSchema.TableColumn colvarPeso = new TableSchema.TableColumn(schema);
                colvarPeso.ColumnName          = "peso";
                colvarPeso.DataType            = DbType.Int32;
                colvarPeso.MaxLength           = 0;
                colvarPeso.AutoIncrement       = false;
                colvarPeso.IsNullable          = true;
                colvarPeso.IsPrimaryKey        = false;
                colvarPeso.IsForeignKey        = false;
                colvarPeso.IsReadOnly          = false;
                colvarPeso.DefaultSetting      = @"";
                colvarPeso.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPeso);

                TableSchema.TableColumn colvarAPGAR1 = new TableSchema.TableColumn(schema);
                colvarAPGAR1.ColumnName          = "APGAR1";
                colvarAPGAR1.DataType            = DbType.Int32;
                colvarAPGAR1.MaxLength           = 0;
                colvarAPGAR1.AutoIncrement       = false;
                colvarAPGAR1.IsNullable          = true;
                colvarAPGAR1.IsPrimaryKey        = false;
                colvarAPGAR1.IsForeignKey        = false;
                colvarAPGAR1.IsReadOnly          = false;
                colvarAPGAR1.DefaultSetting      = @"";
                colvarAPGAR1.ForeignKeyTableName = "";
                schema.Columns.Add(colvarAPGAR1);

                TableSchema.TableColumn colvarAPGAR5 = new TableSchema.TableColumn(schema);
                colvarAPGAR5.ColumnName          = "APGAR5";
                colvarAPGAR5.DataType            = DbType.Int32;
                colvarAPGAR5.MaxLength           = 0;
                colvarAPGAR5.AutoIncrement       = false;
                colvarAPGAR5.IsNullable          = true;
                colvarAPGAR5.IsPrimaryKey        = false;
                colvarAPGAR5.IsForeignKey        = false;
                colvarAPGAR5.IsReadOnly          = false;
                colvarAPGAR5.DefaultSetting      = @"";
                colvarAPGAR5.ForeignKeyTableName = "";
                schema.Columns.Add(colvarAPGAR5);

                TableSchema.TableColumn colvarManejoActivoAlumbramiento = new TableSchema.TableColumn(schema);
                colvarManejoActivoAlumbramiento.ColumnName    = "manejoActivoAlumbramiento";
                colvarManejoActivoAlumbramiento.DataType      = DbType.Boolean;
                colvarManejoActivoAlumbramiento.MaxLength     = 0;
                colvarManejoActivoAlumbramiento.AutoIncrement = false;
                colvarManejoActivoAlumbramiento.IsNullable    = true;
                colvarManejoActivoAlumbramiento.IsPrimaryKey  = false;
                colvarManejoActivoAlumbramiento.IsForeignKey  = false;
                colvarManejoActivoAlumbramiento.IsReadOnly    = false;

                colvarManejoActivoAlumbramiento.DefaultSetting      = @"((0))";
                colvarManejoActivoAlumbramiento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarManejoActivoAlumbramiento);

                TableSchema.TableColumn colvarFechaPrimerControlPuerperio = new TableSchema.TableColumn(schema);
                colvarFechaPrimerControlPuerperio.ColumnName          = "fechaPrimerControlPuerperio";
                colvarFechaPrimerControlPuerperio.DataType            = DbType.DateTime;
                colvarFechaPrimerControlPuerperio.MaxLength           = 0;
                colvarFechaPrimerControlPuerperio.AutoIncrement       = false;
                colvarFechaPrimerControlPuerperio.IsNullable          = true;
                colvarFechaPrimerControlPuerperio.IsPrimaryKey        = false;
                colvarFechaPrimerControlPuerperio.IsForeignKey        = false;
                colvarFechaPrimerControlPuerperio.IsReadOnly          = false;
                colvarFechaPrimerControlPuerperio.DefaultSetting      = @"";
                colvarFechaPrimerControlPuerperio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaPrimerControlPuerperio);

                TableSchema.TableColumn colvarNotaPrimerControlPuerperio = new TableSchema.TableColumn(schema);
                colvarNotaPrimerControlPuerperio.ColumnName          = "NotaPrimerControlPuerperio";
                colvarNotaPrimerControlPuerperio.DataType            = DbType.AnsiString;
                colvarNotaPrimerControlPuerperio.MaxLength           = 500;
                colvarNotaPrimerControlPuerperio.AutoIncrement       = false;
                colvarNotaPrimerControlPuerperio.IsNullable          = true;
                colvarNotaPrimerControlPuerperio.IsPrimaryKey        = false;
                colvarNotaPrimerControlPuerperio.IsForeignKey        = false;
                colvarNotaPrimerControlPuerperio.IsReadOnly          = false;
                colvarNotaPrimerControlPuerperio.DefaultSetting      = @"";
                colvarNotaPrimerControlPuerperio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNotaPrimerControlPuerperio);

                TableSchema.TableColumn colvarFechaSegundoControlPuerperio = new TableSchema.TableColumn(schema);
                colvarFechaSegundoControlPuerperio.ColumnName          = "fechaSegundoControlPuerperio";
                colvarFechaSegundoControlPuerperio.DataType            = DbType.DateTime;
                colvarFechaSegundoControlPuerperio.MaxLength           = 0;
                colvarFechaSegundoControlPuerperio.AutoIncrement       = false;
                colvarFechaSegundoControlPuerperio.IsNullable          = true;
                colvarFechaSegundoControlPuerperio.IsPrimaryKey        = false;
                colvarFechaSegundoControlPuerperio.IsForeignKey        = false;
                colvarFechaSegundoControlPuerperio.IsReadOnly          = false;
                colvarFechaSegundoControlPuerperio.DefaultSetting      = @"";
                colvarFechaSegundoControlPuerperio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaSegundoControlPuerperio);

                TableSchema.TableColumn colvarNotaSegundoControlPuerperio = new TableSchema.TableColumn(schema);
                colvarNotaSegundoControlPuerperio.ColumnName          = "NotaSegundoControlPuerperio";
                colvarNotaSegundoControlPuerperio.DataType            = DbType.AnsiString;
                colvarNotaSegundoControlPuerperio.MaxLength           = 500;
                colvarNotaSegundoControlPuerperio.AutoIncrement       = false;
                colvarNotaSegundoControlPuerperio.IsNullable          = true;
                colvarNotaSegundoControlPuerperio.IsPrimaryKey        = false;
                colvarNotaSegundoControlPuerperio.IsForeignKey        = false;
                colvarNotaSegundoControlPuerperio.IsReadOnly          = false;
                colvarNotaSegundoControlPuerperio.DefaultSetting      = @"";
                colvarNotaSegundoControlPuerperio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNotaSegundoControlPuerperio);

                TableSchema.TableColumn colvarObservaciones = new TableSchema.TableColumn(schema);
                colvarObservaciones.ColumnName          = "observaciones";
                colvarObservaciones.DataType            = DbType.AnsiString;
                colvarObservaciones.MaxLength           = 500;
                colvarObservaciones.AutoIncrement       = false;
                colvarObservaciones.IsNullable          = true;
                colvarObservaciones.IsPrimaryKey        = false;
                colvarObservaciones.IsForeignKey        = false;
                colvarObservaciones.IsReadOnly          = false;
                colvarObservaciones.DefaultSetting      = @"";
                colvarObservaciones.ForeignKeyTableName = "";
                schema.Columns.Add(colvarObservaciones);

                TableSchema.TableColumn colvarActiva = new TableSchema.TableColumn(schema);
                colvarActiva.ColumnName    = "activa";
                colvarActiva.DataType      = DbType.Boolean;
                colvarActiva.MaxLength     = 0;
                colvarActiva.AutoIncrement = false;
                colvarActiva.IsNullable    = false;
                colvarActiva.IsPrimaryKey  = false;
                colvarActiva.IsForeignKey  = false;
                colvarActiva.IsReadOnly    = false;

                colvarActiva.DefaultSetting      = @"((1))";
                colvarActiva.ForeignKeyTableName = "";
                schema.Columns.Add(colvarActiva);

                TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(schema);
                colvarCreatedBy.ColumnName          = "CreatedBy";
                colvarCreatedBy.DataType            = DbType.AnsiString;
                colvarCreatedBy.MaxLength           = 50;
                colvarCreatedBy.AutoIncrement       = false;
                colvarCreatedBy.IsNullable          = true;
                colvarCreatedBy.IsPrimaryKey        = false;
                colvarCreatedBy.IsForeignKey        = false;
                colvarCreatedBy.IsReadOnly          = false;
                colvarCreatedBy.DefaultSetting      = @"";
                colvarCreatedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedBy);

                TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(schema);
                colvarCreatedOn.ColumnName          = "CreatedOn";
                colvarCreatedOn.DataType            = DbType.DateTime;
                colvarCreatedOn.MaxLength           = 0;
                colvarCreatedOn.AutoIncrement       = false;
                colvarCreatedOn.IsNullable          = true;
                colvarCreatedOn.IsPrimaryKey        = false;
                colvarCreatedOn.IsForeignKey        = false;
                colvarCreatedOn.IsReadOnly          = false;
                colvarCreatedOn.DefaultSetting      = @"";
                colvarCreatedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedOn);

                TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(schema);
                colvarModifiedBy.ColumnName          = "ModifiedBy";
                colvarModifiedBy.DataType            = DbType.AnsiString;
                colvarModifiedBy.MaxLength           = 50;
                colvarModifiedBy.AutoIncrement       = false;
                colvarModifiedBy.IsNullable          = true;
                colvarModifiedBy.IsPrimaryKey        = false;
                colvarModifiedBy.IsForeignKey        = false;
                colvarModifiedBy.IsReadOnly          = false;
                colvarModifiedBy.DefaultSetting      = @"";
                colvarModifiedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedBy);

                TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(schema);
                colvarModifiedOn.ColumnName          = "ModifiedOn";
                colvarModifiedOn.DataType            = DbType.DateTime;
                colvarModifiedOn.MaxLength           = 0;
                colvarModifiedOn.AutoIncrement       = false;
                colvarModifiedOn.IsNullable          = true;
                colvarModifiedOn.IsPrimaryKey        = false;
                colvarModifiedOn.IsForeignKey        = false;
                colvarModifiedOn.IsReadOnly          = false;
                colvarModifiedOn.DefaultSetting      = @"";
                colvarModifiedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedOn);

                TableSchema.TableColumn colvarIdProfesional = new TableSchema.TableColumn(schema);
                colvarIdProfesional.ColumnName    = "idProfesional";
                colvarIdProfesional.DataType      = DbType.Int32;
                colvarIdProfesional.MaxLength     = 0;
                colvarIdProfesional.AutoIncrement = false;
                colvarIdProfesional.IsNullable    = true;
                colvarIdProfesional.IsPrimaryKey  = false;
                colvarIdProfesional.IsForeignKey  = true;
                colvarIdProfesional.IsReadOnly    = false;

                colvarIdProfesional.DefaultSetting = @"((0))";

                colvarIdProfesional.ForeignKeyTableName = "Sys_Profesional";
                schema.Columns.Add(colvarIdProfesional);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["sicProvider"].AddSchema("APR_PartoProvisorio", schema);
            }
        }
예제 #15
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("Sys_Parentesco", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdParentesco = new TableSchema.TableColumn(schema);
                colvarIdParentesco.ColumnName          = "idParentesco";
                colvarIdParentesco.DataType            = DbType.Int32;
                colvarIdParentesco.MaxLength           = 0;
                colvarIdParentesco.AutoIncrement       = true;
                colvarIdParentesco.IsNullable          = false;
                colvarIdParentesco.IsPrimaryKey        = true;
                colvarIdParentesco.IsForeignKey        = false;
                colvarIdParentesco.IsReadOnly          = false;
                colvarIdParentesco.DefaultSetting      = @"";
                colvarIdParentesco.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdParentesco);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName          = "nombre";
                colvarNombre.DataType            = DbType.String;
                colvarNombre.MaxLength           = 50;
                colvarNombre.AutoIncrement       = false;
                colvarNombre.IsNullable          = false;
                colvarNombre.IsPrimaryKey        = false;
                colvarNombre.IsForeignKey        = false;
                colvarNombre.IsReadOnly          = false;
                colvarNombre.DefaultSetting      = @"";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarApellido = new TableSchema.TableColumn(schema);
                colvarApellido.ColumnName          = "apellido";
                colvarApellido.DataType            = DbType.String;
                colvarApellido.MaxLength           = 50;
                colvarApellido.AutoIncrement       = false;
                colvarApellido.IsNullable          = false;
                colvarApellido.IsPrimaryKey        = false;
                colvarApellido.IsForeignKey        = false;
                colvarApellido.IsReadOnly          = false;
                colvarApellido.DefaultSetting      = @"";
                colvarApellido.ForeignKeyTableName = "";
                schema.Columns.Add(colvarApellido);

                TableSchema.TableColumn colvarIdTipoDocumento = new TableSchema.TableColumn(schema);
                colvarIdTipoDocumento.ColumnName     = "idTipoDocumento";
                colvarIdTipoDocumento.DataType       = DbType.Int32;
                colvarIdTipoDocumento.MaxLength      = 0;
                colvarIdTipoDocumento.AutoIncrement  = false;
                colvarIdTipoDocumento.IsNullable     = false;
                colvarIdTipoDocumento.IsPrimaryKey   = false;
                colvarIdTipoDocumento.IsForeignKey   = true;
                colvarIdTipoDocumento.IsReadOnly     = false;
                colvarIdTipoDocumento.DefaultSetting = @"";

                colvarIdTipoDocumento.ForeignKeyTableName = "Sys_TipoDocumento";
                schema.Columns.Add(colvarIdTipoDocumento);

                TableSchema.TableColumn colvarNumeroDocumento = new TableSchema.TableColumn(schema);
                colvarNumeroDocumento.ColumnName          = "numeroDocumento";
                colvarNumeroDocumento.DataType            = DbType.Int32;
                colvarNumeroDocumento.MaxLength           = 0;
                colvarNumeroDocumento.AutoIncrement       = false;
                colvarNumeroDocumento.IsNullable          = false;
                colvarNumeroDocumento.IsPrimaryKey        = false;
                colvarNumeroDocumento.IsForeignKey        = false;
                colvarNumeroDocumento.IsReadOnly          = false;
                colvarNumeroDocumento.DefaultSetting      = @"";
                colvarNumeroDocumento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNumeroDocumento);

                TableSchema.TableColumn colvarFechaNacimiento = new TableSchema.TableColumn(schema);
                colvarFechaNacimiento.ColumnName    = "fechaNacimiento";
                colvarFechaNacimiento.DataType      = DbType.DateTime;
                colvarFechaNacimiento.MaxLength     = 0;
                colvarFechaNacimiento.AutoIncrement = false;
                colvarFechaNacimiento.IsNullable    = false;
                colvarFechaNacimiento.IsPrimaryKey  = false;
                colvarFechaNacimiento.IsForeignKey  = false;
                colvarFechaNacimiento.IsReadOnly    = false;

                colvarFechaNacimiento.DefaultSetting      = @"(((1)/(1))/(1900))";
                colvarFechaNacimiento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaNacimiento);

                TableSchema.TableColumn colvarIdProvincia = new TableSchema.TableColumn(schema);
                colvarIdProvincia.ColumnName    = "idProvincia";
                colvarIdProvincia.DataType      = DbType.Int32;
                colvarIdProvincia.MaxLength     = 0;
                colvarIdProvincia.AutoIncrement = false;
                colvarIdProvincia.IsNullable    = false;
                colvarIdProvincia.IsPrimaryKey  = false;
                colvarIdProvincia.IsForeignKey  = true;
                colvarIdProvincia.IsReadOnly    = false;

                colvarIdProvincia.DefaultSetting = @"((0))";

                colvarIdProvincia.ForeignKeyTableName = "Sys_Provincia";
                schema.Columns.Add(colvarIdProvincia);

                TableSchema.TableColumn colvarIdPais = new TableSchema.TableColumn(schema);
                colvarIdPais.ColumnName    = "idPais";
                colvarIdPais.DataType      = DbType.Int32;
                colvarIdPais.MaxLength     = 0;
                colvarIdPais.AutoIncrement = false;
                colvarIdPais.IsNullable    = false;
                colvarIdPais.IsPrimaryKey  = false;
                colvarIdPais.IsForeignKey  = true;
                colvarIdPais.IsReadOnly    = false;

                colvarIdPais.DefaultSetting = @"((0))";

                colvarIdPais.ForeignKeyTableName = "Sys_Pais";
                schema.Columns.Add(colvarIdPais);

                TableSchema.TableColumn colvarIdSituacionLaboral = new TableSchema.TableColumn(schema);
                colvarIdSituacionLaboral.ColumnName    = "idSituacionLaboral";
                colvarIdSituacionLaboral.DataType      = DbType.Int32;
                colvarIdSituacionLaboral.MaxLength     = 0;
                colvarIdSituacionLaboral.AutoIncrement = false;
                colvarIdSituacionLaboral.IsNullable    = false;
                colvarIdSituacionLaboral.IsPrimaryKey  = false;
                colvarIdSituacionLaboral.IsForeignKey  = true;
                colvarIdSituacionLaboral.IsReadOnly    = false;

                colvarIdSituacionLaboral.DefaultSetting = @"((0))";

                colvarIdSituacionLaboral.ForeignKeyTableName = "Sys_SituacionLaboral";
                schema.Columns.Add(colvarIdSituacionLaboral);

                TableSchema.TableColumn colvarIdNivelInstruccion = new TableSchema.TableColumn(schema);
                colvarIdNivelInstruccion.ColumnName    = "idNivelInstruccion";
                colvarIdNivelInstruccion.DataType      = DbType.Int32;
                colvarIdNivelInstruccion.MaxLength     = 0;
                colvarIdNivelInstruccion.AutoIncrement = false;
                colvarIdNivelInstruccion.IsNullable    = false;
                colvarIdNivelInstruccion.IsPrimaryKey  = false;
                colvarIdNivelInstruccion.IsForeignKey  = true;
                colvarIdNivelInstruccion.IsReadOnly    = false;

                colvarIdNivelInstruccion.DefaultSetting = @"((0))";

                colvarIdNivelInstruccion.ForeignKeyTableName = "Sys_NivelInstruccion";
                schema.Columns.Add(colvarIdNivelInstruccion);

                TableSchema.TableColumn colvarIdProfesion = new TableSchema.TableColumn(schema);
                colvarIdProfesion.ColumnName    = "idProfesion";
                colvarIdProfesion.DataType      = DbType.Int32;
                colvarIdProfesion.MaxLength     = 0;
                colvarIdProfesion.AutoIncrement = false;
                colvarIdProfesion.IsNullable    = false;
                colvarIdProfesion.IsPrimaryKey  = false;
                colvarIdProfesion.IsForeignKey  = true;
                colvarIdProfesion.IsReadOnly    = false;

                colvarIdProfesion.DefaultSetting = @"((0))";

                colvarIdProfesion.ForeignKeyTableName = "Sys_Profesion";
                schema.Columns.Add(colvarIdProfesion);

                TableSchema.TableColumn colvarIdPaciente = new TableSchema.TableColumn(schema);
                colvarIdPaciente.ColumnName     = "idPaciente";
                colvarIdPaciente.DataType       = DbType.Int32;
                colvarIdPaciente.MaxLength      = 0;
                colvarIdPaciente.AutoIncrement  = false;
                colvarIdPaciente.IsNullable     = false;
                colvarIdPaciente.IsPrimaryKey   = false;
                colvarIdPaciente.IsForeignKey   = true;
                colvarIdPaciente.IsReadOnly     = false;
                colvarIdPaciente.DefaultSetting = @"";

                colvarIdPaciente.ForeignKeyTableName = "Sys_Paciente";
                schema.Columns.Add(colvarIdPaciente);

                TableSchema.TableColumn colvarTipoParentesco = new TableSchema.TableColumn(schema);
                colvarTipoParentesco.ColumnName          = "tipoParentesco";
                colvarTipoParentesco.DataType            = DbType.String;
                colvarTipoParentesco.MaxLength           = 50;
                colvarTipoParentesco.AutoIncrement       = false;
                colvarTipoParentesco.IsNullable          = false;
                colvarTipoParentesco.IsPrimaryKey        = false;
                colvarTipoParentesco.IsForeignKey        = false;
                colvarTipoParentesco.IsReadOnly          = false;
                colvarTipoParentesco.DefaultSetting      = @"";
                colvarTipoParentesco.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTipoParentesco);

                TableSchema.TableColumn colvarIdUsuario = new TableSchema.TableColumn(schema);
                colvarIdUsuario.ColumnName          = "idUsuario";
                colvarIdUsuario.DataType            = DbType.Int32;
                colvarIdUsuario.MaxLength           = 0;
                colvarIdUsuario.AutoIncrement       = false;
                colvarIdUsuario.IsNullable          = false;
                colvarIdUsuario.IsPrimaryKey        = false;
                colvarIdUsuario.IsForeignKey        = false;
                colvarIdUsuario.IsReadOnly          = false;
                colvarIdUsuario.DefaultSetting      = @"";
                colvarIdUsuario.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdUsuario);

                TableSchema.TableColumn colvarFechaModificacion = new TableSchema.TableColumn(schema);
                colvarFechaModificacion.ColumnName          = "fechaModificacion";
                colvarFechaModificacion.DataType            = DbType.DateTime;
                colvarFechaModificacion.MaxLength           = 0;
                colvarFechaModificacion.AutoIncrement       = false;
                colvarFechaModificacion.IsNullable          = false;
                colvarFechaModificacion.IsPrimaryKey        = false;
                colvarFechaModificacion.IsForeignKey        = false;
                colvarFechaModificacion.IsReadOnly          = false;
                colvarFechaModificacion.DefaultSetting      = @"";
                colvarFechaModificacion.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaModificacion);

                TableSchema.TableColumn colvarIdAntecedente = new TableSchema.TableColumn(schema);
                colvarIdAntecedente.ColumnName    = "idAntecedente";
                colvarIdAntecedente.DataType      = DbType.Int32;
                colvarIdAntecedente.MaxLength     = 0;
                colvarIdAntecedente.AutoIncrement = false;
                colvarIdAntecedente.IsNullable    = false;
                colvarIdAntecedente.IsPrimaryKey  = false;
                colvarIdAntecedente.IsForeignKey  = true;
                colvarIdAntecedente.IsReadOnly    = false;

                colvarIdAntecedente.DefaultSetting = @"((0))";

                colvarIdAntecedente.ForeignKeyTableName = "Sys_Antecedente";
                schema.Columns.Add(colvarIdAntecedente);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("Sys_Parentesco", schema);
            }
        }
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("customer_target_list", TableType.Table, DataService.GetInstance("targetprov"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarTargetID = new TableSchema.TableColumn(schema);
                colvarTargetID.ColumnName          = "targetID";
                colvarTargetID.DataType            = DbType.Int32;
                colvarTargetID.MaxLength           = 0;
                colvarTargetID.AutoIncrement       = true;
                colvarTargetID.IsNullable          = false;
                colvarTargetID.IsPrimaryKey        = true;
                colvarTargetID.IsForeignKey        = false;
                colvarTargetID.IsReadOnly          = false;
                colvarTargetID.DefaultSetting      = @"";
                colvarTargetID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTargetID);

                TableSchema.TableColumn colvarInsertDate = new TableSchema.TableColumn(schema);
                colvarInsertDate.ColumnName          = "insert_date";
                colvarInsertDate.DataType            = DbType.DateTime;
                colvarInsertDate.MaxLength           = 0;
                colvarInsertDate.AutoIncrement       = false;
                colvarInsertDate.IsNullable          = true;
                colvarInsertDate.IsPrimaryKey        = false;
                colvarInsertDate.IsForeignKey        = false;
                colvarInsertDate.IsReadOnly          = false;
                colvarInsertDate.DefaultSetting      = @"";
                colvarInsertDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarInsertDate);

                TableSchema.TableColumn colvarInsertUser = new TableSchema.TableColumn(schema);
                colvarInsertUser.ColumnName          = "insert_user";
                colvarInsertUser.DataType            = DbType.String;
                colvarInsertUser.MaxLength           = 25;
                colvarInsertUser.AutoIncrement       = false;
                colvarInsertUser.IsNullable          = true;
                colvarInsertUser.IsPrimaryKey        = false;
                colvarInsertUser.IsForeignKey        = false;
                colvarInsertUser.IsReadOnly          = false;
                colvarInsertUser.DefaultSetting      = @"";
                colvarInsertUser.ForeignKeyTableName = "";
                schema.Columns.Add(colvarInsertUser);

                TableSchema.TableColumn colvarCompanyName = new TableSchema.TableColumn(schema);
                colvarCompanyName.ColumnName          = "company_name";
                colvarCompanyName.DataType            = DbType.String;
                colvarCompanyName.MaxLength           = 75;
                colvarCompanyName.AutoIncrement       = false;
                colvarCompanyName.IsNullable          = true;
                colvarCompanyName.IsPrimaryKey        = false;
                colvarCompanyName.IsForeignKey        = false;
                colvarCompanyName.IsReadOnly          = false;
                colvarCompanyName.DefaultSetting      = @"";
                colvarCompanyName.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCompanyName);

                TableSchema.TableColumn colvarContactName = new TableSchema.TableColumn(schema);
                colvarContactName.ColumnName          = "contact_name";
                colvarContactName.DataType            = DbType.String;
                colvarContactName.MaxLength           = 50;
                colvarContactName.AutoIncrement       = false;
                colvarContactName.IsNullable          = true;
                colvarContactName.IsPrimaryKey        = false;
                colvarContactName.IsForeignKey        = false;
                colvarContactName.IsReadOnly          = false;
                colvarContactName.DefaultSetting      = @"";
                colvarContactName.ForeignKeyTableName = "";
                schema.Columns.Add(colvarContactName);

                TableSchema.TableColumn colvarContactEmail = new TableSchema.TableColumn(schema);
                colvarContactEmail.ColumnName          = "contact_email";
                colvarContactEmail.DataType            = DbType.String;
                colvarContactEmail.MaxLength           = 50;
                colvarContactEmail.AutoIncrement       = false;
                colvarContactEmail.IsNullable          = true;
                colvarContactEmail.IsPrimaryKey        = false;
                colvarContactEmail.IsForeignKey        = false;
                colvarContactEmail.IsReadOnly          = false;
                colvarContactEmail.DefaultSetting      = @"";
                colvarContactEmail.ForeignKeyTableName = "";
                schema.Columns.Add(colvarContactEmail);

                TableSchema.TableColumn colvarContactPosition = new TableSchema.TableColumn(schema);
                colvarContactPosition.ColumnName          = "contact_position";
                colvarContactPosition.DataType            = DbType.String;
                colvarContactPosition.MaxLength           = 30;
                colvarContactPosition.AutoIncrement       = false;
                colvarContactPosition.IsNullable          = true;
                colvarContactPosition.IsPrimaryKey        = false;
                colvarContactPosition.IsForeignKey        = false;
                colvarContactPosition.IsReadOnly          = false;
                colvarContactPosition.DefaultSetting      = @"";
                colvarContactPosition.ForeignKeyTableName = "";
                schema.Columns.Add(colvarContactPosition);

                TableSchema.TableColumn colvarCompanyAddress = new TableSchema.TableColumn(schema);
                colvarCompanyAddress.ColumnName          = "company_address";
                colvarCompanyAddress.DataType            = DbType.String;
                colvarCompanyAddress.MaxLength           = 200;
                colvarCompanyAddress.AutoIncrement       = false;
                colvarCompanyAddress.IsNullable          = true;
                colvarCompanyAddress.IsPrimaryKey        = false;
                colvarCompanyAddress.IsForeignKey        = false;
                colvarCompanyAddress.IsReadOnly          = false;
                colvarCompanyAddress.DefaultSetting      = @"";
                colvarCompanyAddress.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCompanyAddress);

                TableSchema.TableColumn colvarTelNo = new TableSchema.TableColumn(schema);
                colvarTelNo.ColumnName          = "tel_no";
                colvarTelNo.DataType            = DbType.String;
                colvarTelNo.MaxLength           = 50;
                colvarTelNo.AutoIncrement       = false;
                colvarTelNo.IsNullable          = true;
                colvarTelNo.IsPrimaryKey        = false;
                colvarTelNo.IsForeignKey        = false;
                colvarTelNo.IsReadOnly          = false;
                colvarTelNo.DefaultSetting      = @"";
                colvarTelNo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTelNo);

                TableSchema.TableColumn colvarPrintersInfo = new TableSchema.TableColumn(schema);
                colvarPrintersInfo.ColumnName          = "printers_info";
                colvarPrintersInfo.DataType            = DbType.AnsiString;
                colvarPrintersInfo.MaxLength           = 2147483647;
                colvarPrintersInfo.AutoIncrement       = false;
                colvarPrintersInfo.IsNullable          = true;
                colvarPrintersInfo.IsPrimaryKey        = false;
                colvarPrintersInfo.IsForeignKey        = false;
                colvarPrintersInfo.IsReadOnly          = false;
                colvarPrintersInfo.DefaultSetting      = @"";
                colvarPrintersInfo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPrintersInfo);

                TableSchema.TableColumn colvarLastContacted = new TableSchema.TableColumn(schema);
                colvarLastContacted.ColumnName          = "last_contacted";
                colvarLastContacted.DataType            = DbType.String;
                colvarLastContacted.MaxLength           = 200;
                colvarLastContacted.AutoIncrement       = false;
                colvarLastContacted.IsNullable          = true;
                colvarLastContacted.IsPrimaryKey        = false;
                colvarLastContacted.IsForeignKey        = false;
                colvarLastContacted.IsReadOnly          = false;
                colvarLastContacted.DefaultSetting      = @"";
                colvarLastContacted.ForeignKeyTableName = "";
                schema.Columns.Add(colvarLastContacted);

                TableSchema.TableColumn colvarShippingProfile = new TableSchema.TableColumn(schema);
                colvarShippingProfile.ColumnName          = "shipping_profile";
                colvarShippingProfile.DataType            = DbType.AnsiString;
                colvarShippingProfile.MaxLength           = 2147483647;
                colvarShippingProfile.AutoIncrement       = false;
                colvarShippingProfile.IsNullable          = true;
                colvarShippingProfile.IsPrimaryKey        = false;
                colvarShippingProfile.IsForeignKey        = false;
                colvarShippingProfile.IsReadOnly          = false;
                colvarShippingProfile.DefaultSetting      = @"";
                colvarShippingProfile.ForeignKeyTableName = "";
                schema.Columns.Add(colvarShippingProfile);

                TableSchema.TableColumn colvarComments = new TableSchema.TableColumn(schema);
                colvarComments.ColumnName          = "comments";
                colvarComments.DataType            = DbType.AnsiString;
                colvarComments.MaxLength           = 2147483647;
                colvarComments.AutoIncrement       = false;
                colvarComments.IsNullable          = true;
                colvarComments.IsPrimaryKey        = false;
                colvarComments.IsForeignKey        = false;
                colvarComments.IsReadOnly          = false;
                colvarComments.DefaultSetting      = @"";
                colvarComments.ForeignKeyTableName = "";
                schema.Columns.Add(colvarComments);

                TableSchema.TableColumn colvarSalesCode = new TableSchema.TableColumn(schema);
                colvarSalesCode.ColumnName          = "sales_code";
                colvarSalesCode.DataType            = DbType.String;
                colvarSalesCode.MaxLength           = 5;
                colvarSalesCode.AutoIncrement       = false;
                colvarSalesCode.IsNullable          = true;
                colvarSalesCode.IsPrimaryKey        = false;
                colvarSalesCode.IsForeignKey        = false;
                colvarSalesCode.IsReadOnly          = false;
                colvarSalesCode.DefaultSetting      = @"";
                colvarSalesCode.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSalesCode);

                TableSchema.TableColumn colvarPriorityCode = new TableSchema.TableColumn(schema);
                colvarPriorityCode.ColumnName    = "priority_code";
                colvarPriorityCode.DataType      = DbType.String;
                colvarPriorityCode.MaxLength     = 5;
                colvarPriorityCode.AutoIncrement = false;
                colvarPriorityCode.IsNullable    = true;
                colvarPriorityCode.IsPrimaryKey  = false;
                colvarPriorityCode.IsForeignKey  = false;
                colvarPriorityCode.IsReadOnly    = false;

                colvarPriorityCode.DefaultSetting      = @"((0))";
                colvarPriorityCode.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPriorityCode);

                TableSchema.TableColumn colvarUpdateDate = new TableSchema.TableColumn(schema);
                colvarUpdateDate.ColumnName          = "update_date";
                colvarUpdateDate.DataType            = DbType.DateTime;
                colvarUpdateDate.MaxLength           = 0;
                colvarUpdateDate.AutoIncrement       = false;
                colvarUpdateDate.IsNullable          = true;
                colvarUpdateDate.IsPrimaryKey        = false;
                colvarUpdateDate.IsForeignKey        = false;
                colvarUpdateDate.IsReadOnly          = false;
                colvarUpdateDate.DefaultSetting      = @"";
                colvarUpdateDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUpdateDate);

                TableSchema.TableColumn colvarUpdateUser = new TableSchema.TableColumn(schema);
                colvarUpdateUser.ColumnName          = "update_user";
                colvarUpdateUser.DataType            = DbType.String;
                colvarUpdateUser.MaxLength           = 25;
                colvarUpdateUser.AutoIncrement       = false;
                colvarUpdateUser.IsNullable          = true;
                colvarUpdateUser.IsPrimaryKey        = false;
                colvarUpdateUser.IsForeignKey        = false;
                colvarUpdateUser.IsReadOnly          = false;
                colvarUpdateUser.DefaultSetting      = @"";
                colvarUpdateUser.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUpdateUser);

                TableSchema.TableColumn colvarDbtimestamp = new TableSchema.TableColumn(schema);
                colvarDbtimestamp.ColumnName          = "dbtimestamp";
                colvarDbtimestamp.DataType            = DbType.Binary;
                colvarDbtimestamp.MaxLength           = 0;
                colvarDbtimestamp.AutoIncrement       = false;
                colvarDbtimestamp.IsNullable          = false;
                colvarDbtimestamp.IsPrimaryKey        = false;
                colvarDbtimestamp.IsForeignKey        = false;
                colvarDbtimestamp.IsReadOnly          = true;
                colvarDbtimestamp.DefaultSetting      = @"";
                colvarDbtimestamp.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDbtimestamp);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["targetprov"].AddSchema("customer_target_list", schema);
            }
        }
예제 #17
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("Sys_SystemParameters", TableType.Table, DataService.GetInstance("ORM"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "ID";
                colvarId.DataType            = DbType.Int64;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarFpSBranchID = new TableSchema.TableColumn(schema);
                colvarFpSBranchID.ColumnName     = "FP_sBranchID";
                colvarFpSBranchID.DataType       = DbType.String;
                colvarFpSBranchID.MaxLength      = 10;
                colvarFpSBranchID.AutoIncrement  = false;
                colvarFpSBranchID.IsNullable     = false;
                colvarFpSBranchID.IsPrimaryKey   = false;
                colvarFpSBranchID.IsForeignKey   = true;
                colvarFpSBranchID.IsReadOnly     = false;
                colvarFpSBranchID.DefaultSetting = @"";

                colvarFpSBranchID.ForeignKeyTableName = "Sys_ManagementUnit";
                schema.Columns.Add(colvarFpSBranchID);

                TableSchema.TableColumn colvarSName = new TableSchema.TableColumn(schema);
                colvarSName.ColumnName          = "sName";
                colvarSName.DataType            = DbType.String;
                colvarSName.MaxLength           = 100;
                colvarSName.AutoIncrement       = false;
                colvarSName.IsNullable          = false;
                colvarSName.IsPrimaryKey        = false;
                colvarSName.IsForeignKey        = false;
                colvarSName.IsReadOnly          = false;
                colvarSName.DefaultSetting      = @"";
                colvarSName.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSName);

                TableSchema.TableColumn colvarSDataType = new TableSchema.TableColumn(schema);
                colvarSDataType.ColumnName          = "sDataType";
                colvarSDataType.DataType            = DbType.String;
                colvarSDataType.MaxLength           = 100;
                colvarSDataType.AutoIncrement       = false;
                colvarSDataType.IsNullable          = false;
                colvarSDataType.IsPrimaryKey        = false;
                colvarSDataType.IsForeignKey        = false;
                colvarSDataType.IsReadOnly          = false;
                colvarSDataType.DefaultSetting      = @"";
                colvarSDataType.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSDataType);

                TableSchema.TableColumn colvarSValue = new TableSchema.TableColumn(schema);
                colvarSValue.ColumnName          = "sValue";
                colvarSValue.DataType            = DbType.String;
                colvarSValue.MaxLength           = 100;
                colvarSValue.AutoIncrement       = false;
                colvarSValue.IsNullable          = false;
                colvarSValue.IsPrimaryKey        = false;
                colvarSValue.IsForeignKey        = false;
                colvarSValue.IsReadOnly          = false;
                colvarSValue.DefaultSetting      = @"";
                colvarSValue.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSValue);

                TableSchema.TableColumn colvarIMonth = new TableSchema.TableColumn(schema);
                colvarIMonth.ColumnName          = "iMonth";
                colvarIMonth.DataType            = DbType.Int32;
                colvarIMonth.MaxLength           = 0;
                colvarIMonth.AutoIncrement       = false;
                colvarIMonth.IsNullable          = false;
                colvarIMonth.IsPrimaryKey        = false;
                colvarIMonth.IsForeignKey        = false;
                colvarIMonth.IsReadOnly          = false;
                colvarIMonth.DefaultSetting      = @"";
                colvarIMonth.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIMonth);

                TableSchema.TableColumn colvarIYear = new TableSchema.TableColumn(schema);
                colvarIYear.ColumnName          = "iYear";
                colvarIYear.DataType            = DbType.Int32;
                colvarIYear.MaxLength           = 0;
                colvarIYear.AutoIncrement       = false;
                colvarIYear.IsNullable          = false;
                colvarIYear.IsPrimaryKey        = false;
                colvarIYear.IsForeignKey        = false;
                colvarIYear.IsReadOnly          = false;
                colvarIYear.DefaultSetting      = @"";
                colvarIYear.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIYear);

                TableSchema.TableColumn colvarIStatus = new TableSchema.TableColumn(schema);
                colvarIStatus.ColumnName          = "iStatus";
                colvarIStatus.DataType            = DbType.Int16;
                colvarIStatus.MaxLength           = 0;
                colvarIStatus.AutoIncrement       = false;
                colvarIStatus.IsNullable          = false;
                colvarIStatus.IsPrimaryKey        = false;
                colvarIStatus.IsForeignKey        = false;
                colvarIStatus.IsReadOnly          = false;
                colvarIStatus.DefaultSetting      = @"";
                colvarIStatus.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIStatus);

                TableSchema.TableColumn colvarSDesc = new TableSchema.TableColumn(schema);
                colvarSDesc.ColumnName          = "sDesc";
                colvarSDesc.DataType            = DbType.String;
                colvarSDesc.MaxLength           = 255;
                colvarSDesc.AutoIncrement       = false;
                colvarSDesc.IsNullable          = true;
                colvarSDesc.IsPrimaryKey        = false;
                colvarSDesc.IsForeignKey        = false;
                colvarSDesc.IsReadOnly          = false;
                colvarSDesc.DefaultSetting      = @"";
                colvarSDesc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSDesc);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["ORM"].AddSchema("Sys_SystemParameters", schema);
            }
        }
예제 #18
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","导航ID"));
            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarNavName = new TableSchema.TableColumn(this);
            colvarNavName.ColumnName = "NavName";
            colvarNavName.DataType = DbType.String;
            colvarNavName.MaxLength = 50;
            colvarNavName.AutoIncrement = false;
            colvarNavName.IsNullable = true;
            colvarNavName.IsPrimaryKey = false;
            colvarNavName.IsForeignKey = false;
            colvarNavName.IsReadOnly = false;

            colvarNavName.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","导航名称"));
            colvarNavName.DefaultSetting = @"";
            colvarNavName.ForeignKeyTableName = "";
            colvarNavName.ApplyExtendedProperties();
            this.Columns.Add(colvarNavName);

            TableSchema.TableColumn colvarSecName = new TableSchema.TableColumn(this);
            colvarSecName.ColumnName = "SecName";
            colvarSecName.DataType = DbType.String;
            colvarSecName.MaxLength = 50;
            colvarSecName.AutoIncrement = false;
            colvarSecName.IsNullable = true;
            colvarSecName.IsPrimaryKey = false;
            colvarSecName.IsForeignKey = false;
            colvarSecName.IsReadOnly = false;

            colvarSecName.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","显示区块"));
            colvarSecName.DefaultSetting = @"";
            colvarSecName.ForeignKeyTableName = "";
            colvarSecName.ApplyExtendedProperties();
            this.Columns.Add(colvarSecName);

            TableSchema.TableColumn colvarOthName = new TableSchema.TableColumn(this);
            colvarOthName.ColumnName = "OthName";
            colvarOthName.DataType = DbType.String;
            colvarOthName.MaxLength = 50;
            colvarOthName.AutoIncrement = false;
            colvarOthName.IsNullable = true;
            colvarOthName.IsPrimaryKey = false;
            colvarOthName.IsForeignKey = false;
            colvarOthName.IsReadOnly = false;

            colvarOthName.DefaultSetting = @"";
            colvarOthName.ForeignKeyTableName = "";
            colvarOthName.ApplyExtendedProperties();
            this.Columns.Add(colvarOthName);

            TableSchema.TableColumn colvarNavUrl = new TableSchema.TableColumn(this);
            colvarNavUrl.ColumnName = "NavUrl";
            colvarNavUrl.DataType = DbType.String;
            colvarNavUrl.MaxLength = 250;
            colvarNavUrl.AutoIncrement = false;
            colvarNavUrl.IsNullable = true;
            colvarNavUrl.IsPrimaryKey = false;
            colvarNavUrl.IsForeignKey = false;
            colvarNavUrl.IsReadOnly = false;

            colvarNavUrl.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","导航URL"));
            colvarNavUrl.DefaultSetting = @"";
            colvarNavUrl.ForeignKeyTableName = "";
            colvarNavUrl.ApplyExtendedProperties();
            this.Columns.Add(colvarNavUrl);

            TableSchema.TableColumn colvarNavIcon = new TableSchema.TableColumn(this);
            colvarNavIcon.ColumnName = "NavIcon";
            colvarNavIcon.DataType = DbType.String;
            colvarNavIcon.MaxLength = 50;
            colvarNavIcon.AutoIncrement = false;
            colvarNavIcon.IsNullable = true;
            colvarNavIcon.IsPrimaryKey = false;
            colvarNavIcon.IsForeignKey = false;
            colvarNavIcon.IsReadOnly = false;

            colvarNavIcon.DefaultSetting = @"";
            colvarNavIcon.ForeignKeyTableName = "";
            colvarNavIcon.ApplyExtendedProperties();
            this.Columns.Add(colvarNavIcon);

            TableSchema.TableColumn colvarSubSysId = new TableSchema.TableColumn(this);
            colvarSubSysId.ColumnName = "SubSys_ID";
            colvarSubSysId.DataType = DbType.Int32;
            colvarSubSysId.MaxLength = 0;
            colvarSubSysId.AutoIncrement = false;
            colvarSubSysId.IsNullable = true;
            colvarSubSysId.IsPrimaryKey = false;
            colvarSubSysId.IsForeignKey = false;
            colvarSubSysId.IsReadOnly = false;

            colvarSubSysId.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","系统ID"));
            colvarSubSysId.DefaultSetting = @"";
            colvarSubSysId.ForeignKeyTableName = "";
            colvarSubSysId.ApplyExtendedProperties();
            this.Columns.Add(colvarSubSysId);

            TableSchema.TableColumn colvarPId = new TableSchema.TableColumn(this);
            colvarPId.ColumnName = "P_ID";
            colvarPId.DataType = DbType.Int32;
            colvarPId.MaxLength = 0;
            colvarPId.AutoIncrement = false;
            colvarPId.IsNullable = true;
            colvarPId.IsPrimaryKey = false;
            colvarPId.IsForeignKey = false;
            colvarPId.IsReadOnly = false;

            colvarPId.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","父导航ID"));

            colvarPId.DefaultSetting = @"((0))";
            colvarPId.ForeignKeyTableName = "";
            colvarPId.ApplyExtendedProperties();
            this.Columns.Add(colvarPId);

            TableSchema.TableColumn colvarIsMainNav = new TableSchema.TableColumn(this);
            colvarIsMainNav.ColumnName = "IsMainNav";
            colvarIsMainNav.DataType = DbType.Boolean;
            colvarIsMainNav.MaxLength = 0;
            colvarIsMainNav.AutoIncrement = false;
            colvarIsMainNav.IsNullable = false;
            colvarIsMainNav.IsPrimaryKey = false;
            colvarIsMainNav.IsForeignKey = false;
            colvarIsMainNav.IsReadOnly = false;

            colvarIsMainNav.DefaultSetting = @"((0))";
            colvarIsMainNav.ForeignKeyTableName = "";
            colvarIsMainNav.ApplyExtendedProperties();
            this.Columns.Add(colvarIsMainNav);

            TableSchema.TableColumn colvarIsHeader = new TableSchema.TableColumn(this);
            colvarIsHeader.ColumnName = "IsHeader";
            colvarIsHeader.DataType = DbType.Boolean;
            colvarIsHeader.MaxLength = 0;
            colvarIsHeader.AutoIncrement = false;
            colvarIsHeader.IsNullable = false;
            colvarIsHeader.IsPrimaryKey = false;
            colvarIsHeader.IsForeignKey = false;
            colvarIsHeader.IsReadOnly = false;

            colvarIsHeader.DefaultSetting = @"((0))";
            colvarIsHeader.ForeignKeyTableName = "";
            colvarIsHeader.ApplyExtendedProperties();
            this.Columns.Add(colvarIsHeader);

            TableSchema.TableColumn colvarIsFooter = new TableSchema.TableColumn(this);
            colvarIsFooter.ColumnName = "IsFooter";
            colvarIsFooter.DataType = DbType.Boolean;
            colvarIsFooter.MaxLength = 0;
            colvarIsFooter.AutoIncrement = false;
            colvarIsFooter.IsNullable = false;
            colvarIsFooter.IsPrimaryKey = false;
            colvarIsFooter.IsForeignKey = false;
            colvarIsFooter.IsReadOnly = false;

            colvarIsFooter.DefaultSetting = @"((0))";
            colvarIsFooter.ForeignKeyTableName = "";
            colvarIsFooter.ApplyExtendedProperties();
            this.Columns.Add(colvarIsFooter);

            TableSchema.TableColumn colvarPermissionRequired = new TableSchema.TableColumn(this);
            colvarPermissionRequired.ColumnName = "PermissionRequired";
            colvarPermissionRequired.DataType = DbType.Boolean;
            colvarPermissionRequired.MaxLength = 0;
            colvarPermissionRequired.AutoIncrement = false;
            colvarPermissionRequired.IsNullable = false;
            colvarPermissionRequired.IsPrimaryKey = false;
            colvarPermissionRequired.IsForeignKey = false;
            colvarPermissionRequired.IsReadOnly = false;

            colvarPermissionRequired.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","匿名可见"));

            colvarPermissionRequired.DefaultSetting = @"((1))";
            colvarPermissionRequired.ForeignKeyTableName = "";
            colvarPermissionRequired.ApplyExtendedProperties();
            this.Columns.Add(colvarPermissionRequired);

            TableSchema.TableColumn colvarSort = new TableSchema.TableColumn(this);
            colvarSort.ColumnName = "Sort";
            colvarSort.DataType = DbType.Int32;
            colvarSort.MaxLength = 0;
            colvarSort.AutoIncrement = false;
            colvarSort.IsNullable = false;
            colvarSort.IsPrimaryKey = false;
            colvarSort.IsForeignKey = false;
            colvarSort.IsReadOnly = false;

            colvarSort.DefaultSetting = @"((0))";
            colvarSort.ForeignKeyTableName = "";
            colvarSort.ApplyExtendedProperties();
            this.Columns.Add(colvarSort);

            TableSchema.TableColumn colvarVisible = new TableSchema.TableColumn(this);
            colvarVisible.ColumnName = "Visible";
            colvarVisible.DataType = DbType.Boolean;
            colvarVisible.MaxLength = 0;
            colvarVisible.AutoIncrement = false;
            colvarVisible.IsNullable = false;
            colvarVisible.IsPrimaryKey = false;
            colvarVisible.IsForeignKey = false;
            colvarVisible.IsReadOnly = false;

            colvarVisible.DefaultSetting = @"((1))";
            colvarVisible.ForeignKeyTableName = "";
            colvarVisible.ApplyExtendedProperties();
            this.Columns.Add(colvarVisible);

            TableSchema.TableColumn colvarDepth = new TableSchema.TableColumn(this);
            colvarDepth.ColumnName = "Depth";
            colvarDepth.DataType = DbType.String;
            colvarDepth.MaxLength = 250;
            colvarDepth.AutoIncrement = false;
            colvarDepth.IsNullable = true;
            colvarDepth.IsPrimaryKey = false;
            colvarDepth.IsForeignKey = false;
            colvarDepth.IsReadOnly = false;

            colvarDepth.DefaultSetting = @"";
            colvarDepth.ForeignKeyTableName = "";
            colvarDepth.ApplyExtendedProperties();
            this.Columns.Add(colvarDepth);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #19
0
        public void CreateTable_Should_Allow_Char3_As_PrimaryKey() {

            new InlineQuery("Northwind").Execute("IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MyTb]') AND type in (N'U')) \r\n DROP TABLE [dbo].[MyTb]");


            using (Migration m = new Migration("Northwind")) {
                TableSchema.Table tb = m.CreateTable("MyTb");
                TableSchema.TableColumn col = new TableSchema.TableColumn(tb);
                col.ColumnName = "Id";
                col.DataType = System.Data.DbType.AnsiStringFixedLength;
                col.MaxLength = 3;
                col.IsPrimaryKey = true;
                tb.AddColumn(col);
            }


            //pull the table out
            DataService.ClearSchemaCache("Northwind");
            TableSchema.Table table = DataService.GetSchema("MyTb", "Northwind");

            Assert.IsNotNull(table);
            Assert.AreEqual(3, table.PrimaryKey.MaxLength);
        }
예제 #20
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("aspnet_PersonalizationPerUser", TableType.Table, DataService.GetInstance("SignificantTradeSS"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName    = "Id";
                colvarId.DataType      = DbType.Guid;
                colvarId.MaxLength     = 0;
                colvarId.AutoIncrement = false;
                colvarId.IsNullable    = false;
                colvarId.IsPrimaryKey  = true;
                colvarId.IsForeignKey  = false;
                colvarId.IsReadOnly    = false;

                colvarId.DefaultSetting      = @"(newid())";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarPathId = new TableSchema.TableColumn(schema);
                colvarPathId.ColumnName     = "PathId";
                colvarPathId.DataType       = DbType.Guid;
                colvarPathId.MaxLength      = 0;
                colvarPathId.AutoIncrement  = false;
                colvarPathId.IsNullable     = true;
                colvarPathId.IsPrimaryKey   = false;
                colvarPathId.IsForeignKey   = true;
                colvarPathId.IsReadOnly     = false;
                colvarPathId.DefaultSetting = @"";

                colvarPathId.ForeignKeyTableName = "aspnet_Paths";
                schema.Columns.Add(colvarPathId);

                TableSchema.TableColumn colvarUserId = new TableSchema.TableColumn(schema);
                colvarUserId.ColumnName     = "UserId";
                colvarUserId.DataType       = DbType.Guid;
                colvarUserId.MaxLength      = 0;
                colvarUserId.AutoIncrement  = false;
                colvarUserId.IsNullable     = true;
                colvarUserId.IsPrimaryKey   = false;
                colvarUserId.IsForeignKey   = true;
                colvarUserId.IsReadOnly     = false;
                colvarUserId.DefaultSetting = @"";

                colvarUserId.ForeignKeyTableName = "aspnet_Users";
                schema.Columns.Add(colvarUserId);

                TableSchema.TableColumn colvarPageSettings = new TableSchema.TableColumn(schema);
                colvarPageSettings.ColumnName          = "PageSettings";
                colvarPageSettings.DataType            = DbType.Binary;
                colvarPageSettings.MaxLength           = 2147483647;
                colvarPageSettings.AutoIncrement       = false;
                colvarPageSettings.IsNullable          = false;
                colvarPageSettings.IsPrimaryKey        = false;
                colvarPageSettings.IsForeignKey        = false;
                colvarPageSettings.IsReadOnly          = false;
                colvarPageSettings.DefaultSetting      = @"";
                colvarPageSettings.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPageSettings);

                TableSchema.TableColumn colvarLastUpdatedDate = new TableSchema.TableColumn(schema);
                colvarLastUpdatedDate.ColumnName          = "LastUpdatedDate";
                colvarLastUpdatedDate.DataType            = DbType.DateTime;
                colvarLastUpdatedDate.MaxLength           = 0;
                colvarLastUpdatedDate.AutoIncrement       = false;
                colvarLastUpdatedDate.IsNullable          = false;
                colvarLastUpdatedDate.IsPrimaryKey        = false;
                colvarLastUpdatedDate.IsForeignKey        = false;
                colvarLastUpdatedDate.IsReadOnly          = false;
                colvarLastUpdatedDate.DefaultSetting      = @"";
                colvarLastUpdatedDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarLastUpdatedDate);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["SignificantTradeSS"].AddSchema("aspnet_PersonalizationPerUser", schema);
            }
        }
예제 #21
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarTitle = new TableSchema.TableColumn(this);
            colvarTitle.ColumnName = "Title";
            colvarTitle.DataType = DbType.String;
            colvarTitle.MaxLength = 250;
            colvarTitle.AutoIncrement = false;
            colvarTitle.IsNullable = true;
            colvarTitle.IsPrimaryKey = false;
            colvarTitle.IsForeignKey = false;
            colvarTitle.IsReadOnly = false;

            colvarTitle.DefaultSetting = @"";
            colvarTitle.ForeignKeyTableName = "";
            colvarTitle.ApplyExtendedProperties();
            this.Columns.Add(colvarTitle);

            TableSchema.TableColumn colvarContent = new TableSchema.TableColumn(this);
            colvarContent.ColumnName = "Content";
            colvarContent.DataType = DbType.String;
            colvarContent.MaxLength = 1073741823;
            colvarContent.AutoIncrement = false;
            colvarContent.IsNullable = true;
            colvarContent.IsPrimaryKey = false;
            colvarContent.IsForeignKey = false;
            colvarContent.IsReadOnly = false;

            colvarContent.DefaultSetting = @"";
            colvarContent.ForeignKeyTableName = "";
            colvarContent.ApplyExtendedProperties();
            this.Columns.Add(colvarContent);

            TableSchema.TableColumn colvarKeyWord = new TableSchema.TableColumn(this);
            colvarKeyWord.ColumnName = "KeyWord";
            colvarKeyWord.DataType = DbType.String;
            colvarKeyWord.MaxLength = 250;
            colvarKeyWord.AutoIncrement = false;
            colvarKeyWord.IsNullable = true;
            colvarKeyWord.IsPrimaryKey = false;
            colvarKeyWord.IsForeignKey = false;
            colvarKeyWord.IsReadOnly = false;

            colvarKeyWord.DefaultSetting = @"";
            colvarKeyWord.ForeignKeyTableName = "";
            colvarKeyWord.ApplyExtendedProperties();
            this.Columns.Add(colvarKeyWord);

            TableSchema.TableColumn colvarHits = new TableSchema.TableColumn(this);
            colvarHits.ColumnName = "Hits";
            colvarHits.DataType = DbType.Int32;
            colvarHits.MaxLength = 0;
            colvarHits.AutoIncrement = false;
            colvarHits.IsNullable = true;
            colvarHits.IsPrimaryKey = false;
            colvarHits.IsForeignKey = false;
            colvarHits.IsReadOnly = false;

            colvarHits.DefaultSetting = @"";
            colvarHits.ForeignKeyTableName = "";
            colvarHits.ApplyExtendedProperties();
            this.Columns.Add(colvarHits);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarAuditedBy = new TableSchema.TableColumn(this);
            colvarAuditedBy.ColumnName = "AuditedBy";
            colvarAuditedBy.DataType = DbType.Int32;
            colvarAuditedBy.MaxLength = 0;
            colvarAuditedBy.AutoIncrement = false;
            colvarAuditedBy.IsNullable = true;
            colvarAuditedBy.IsPrimaryKey = false;
            colvarAuditedBy.IsForeignKey = false;
            colvarAuditedBy.IsReadOnly = false;

            colvarAuditedBy.DefaultSetting = @"";
            colvarAuditedBy.ForeignKeyTableName = "";
            colvarAuditedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarAuditedBy);

            TableSchema.TableColumn colvarAuditedOn = new TableSchema.TableColumn(this);
            colvarAuditedOn.ColumnName = "AuditedOn";
            colvarAuditedOn.DataType = DbType.DateTime;
            colvarAuditedOn.MaxLength = 0;
            colvarAuditedOn.AutoIncrement = false;
            colvarAuditedOn.IsNullable = true;
            colvarAuditedOn.IsPrimaryKey = false;
            colvarAuditedOn.IsForeignKey = false;
            colvarAuditedOn.IsReadOnly = false;

            colvarAuditedOn.DefaultSetting = @"";
            colvarAuditedOn.ForeignKeyTableName = "";
            colvarAuditedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarAuditedOn);

            TableSchema.TableColumn colvarUId = new TableSchema.TableColumn(this);
            colvarUId.ColumnName = "U_ID";
            colvarUId.DataType = DbType.Int32;
            colvarUId.MaxLength = 0;
            colvarUId.AutoIncrement = false;
            colvarUId.IsNullable = true;
            colvarUId.IsPrimaryKey = false;
            colvarUId.IsForeignKey = false;
            colvarUId.IsReadOnly = false;

            colvarUId.DefaultSetting = @"";
            colvarUId.ForeignKeyTableName = "";
            colvarUId.ApplyExtendedProperties();
            this.Columns.Add(colvarUId);

            TableSchema.TableColumn colvarCId = new TableSchema.TableColumn(this);
            colvarCId.ColumnName = "C_ID";
            colvarCId.DataType = DbType.Int32;
            colvarCId.MaxLength = 0;
            colvarCId.AutoIncrement = false;
            colvarCId.IsNullable = true;
            colvarCId.IsPrimaryKey = false;
            colvarCId.IsForeignKey = false;
            colvarCId.IsReadOnly = false;

            colvarCId.DefaultSetting = @"";
            colvarCId.ForeignKeyTableName = "";
            colvarCId.ApplyExtendedProperties();
            this.Columns.Add(colvarCId);

            TableSchema.TableColumn colvarPic = new TableSchema.TableColumn(this);
            colvarPic.ColumnName = "Pic";
            colvarPic.DataType = DbType.String;
            colvarPic.MaxLength = 150;
            colvarPic.AutoIncrement = false;
            colvarPic.IsNullable = true;
            colvarPic.IsPrimaryKey = false;
            colvarPic.IsForeignKey = false;
            colvarPic.IsReadOnly = false;

            colvarPic.DefaultSetting = @"";
            colvarPic.ForeignKeyTableName = "";
            colvarPic.ApplyExtendedProperties();
            this.Columns.Add(colvarPic);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #22
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("RIS_EstudioComiteEtica", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdEstudioComiteEtica = new TableSchema.TableColumn(schema);
                colvarIdEstudioComiteEtica.ColumnName          = "idEstudioComiteEtica";
                colvarIdEstudioComiteEtica.DataType            = DbType.Int32;
                colvarIdEstudioComiteEtica.MaxLength           = 0;
                colvarIdEstudioComiteEtica.AutoIncrement       = true;
                colvarIdEstudioComiteEtica.IsNullable          = false;
                colvarIdEstudioComiteEtica.IsPrimaryKey        = true;
                colvarIdEstudioComiteEtica.IsForeignKey        = false;
                colvarIdEstudioComiteEtica.IsReadOnly          = false;
                colvarIdEstudioComiteEtica.DefaultSetting      = @"";
                colvarIdEstudioComiteEtica.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdEstudioComiteEtica);

                TableSchema.TableColumn colvarIdEstudio = new TableSchema.TableColumn(schema);
                colvarIdEstudio.ColumnName          = "idEstudio";
                colvarIdEstudio.DataType            = DbType.Int32;
                colvarIdEstudio.MaxLength           = 0;
                colvarIdEstudio.AutoIncrement       = false;
                colvarIdEstudio.IsNullable          = false;
                colvarIdEstudio.IsPrimaryKey        = false;
                colvarIdEstudio.IsForeignKey        = false;
                colvarIdEstudio.IsReadOnly          = false;
                colvarIdEstudio.DefaultSetting      = @"";
                colvarIdEstudio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdEstudio);

                TableSchema.TableColumn colvarIdComiteEtica = new TableSchema.TableColumn(schema);
                colvarIdComiteEtica.ColumnName          = "idComiteEtica";
                colvarIdComiteEtica.DataType            = DbType.Int32;
                colvarIdComiteEtica.MaxLength           = 0;
                colvarIdComiteEtica.AutoIncrement       = false;
                colvarIdComiteEtica.IsNullable          = false;
                colvarIdComiteEtica.IsPrimaryKey        = false;
                colvarIdComiteEtica.IsForeignKey        = false;
                colvarIdComiteEtica.IsReadOnly          = false;
                colvarIdComiteEtica.DefaultSetting      = @"";
                colvarIdComiteEtica.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdComiteEtica);

                TableSchema.TableColumn colvarDictamen = new TableSchema.TableColumn(schema);
                colvarDictamen.ColumnName          = "dictamen";
                colvarDictamen.DataType            = DbType.AnsiString;
                colvarDictamen.MaxLength           = 100;
                colvarDictamen.AutoIncrement       = false;
                colvarDictamen.IsNullable          = false;
                colvarDictamen.IsPrimaryKey        = false;
                colvarDictamen.IsForeignKey        = false;
                colvarDictamen.IsReadOnly          = false;
                colvarDictamen.DefaultSetting      = @"";
                colvarDictamen.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDictamen);

                TableSchema.TableColumn colvarFechaDictamen = new TableSchema.TableColumn(schema);
                colvarFechaDictamen.ColumnName          = "fechaDictamen";
                colvarFechaDictamen.DataType            = DbType.DateTime;
                colvarFechaDictamen.MaxLength           = 0;
                colvarFechaDictamen.AutoIncrement       = false;
                colvarFechaDictamen.IsNullable          = false;
                colvarFechaDictamen.IsPrimaryKey        = false;
                colvarFechaDictamen.IsForeignKey        = false;
                colvarFechaDictamen.IsReadOnly          = false;
                colvarFechaDictamen.DefaultSetting      = @"";
                colvarFechaDictamen.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaDictamen);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("RIS_EstudioComiteEtica", schema);
            }
        }
예제 #23
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarMenuId = new TableSchema.TableColumn(this);
            colvarMenuId.ColumnName = "MenuId";
            colvarMenuId.DataType = DbType.Int32;
            colvarMenuId.MaxLength = 0;
            colvarMenuId.AutoIncrement = false;
            colvarMenuId.IsNullable = true;
            colvarMenuId.IsPrimaryKey = false;
            colvarMenuId.IsForeignKey = false;
            colvarMenuId.IsReadOnly = false;

            colvarMenuId.DefaultSetting = @"";
            colvarMenuId.ForeignKeyTableName = "";
            colvarMenuId.ApplyExtendedProperties();
            this.Columns.Add(colvarMenuId);

            TableSchema.TableColumn colvarMenuName = new TableSchema.TableColumn(this);
            colvarMenuName.ColumnName = "MenuName";
            colvarMenuName.DataType = DbType.String;
            colvarMenuName.MaxLength = -1;
            colvarMenuName.AutoIncrement = false;
            colvarMenuName.IsNullable = true;
            colvarMenuName.IsPrimaryKey = false;
            colvarMenuName.IsForeignKey = false;
            colvarMenuName.IsReadOnly = false;

            colvarMenuName.DefaultSetting = @"";
            colvarMenuName.ForeignKeyTableName = "";
            colvarMenuName.ApplyExtendedProperties();
            this.Columns.Add(colvarMenuName);

            TableSchema.TableColumn colvarOrderId = new TableSchema.TableColumn(this);
            colvarOrderId.ColumnName = "OrderId";
            colvarOrderId.DataType = DbType.Int32;
            colvarOrderId.MaxLength = 0;
            colvarOrderId.AutoIncrement = false;
            colvarOrderId.IsNullable = true;
            colvarOrderId.IsPrimaryKey = false;
            colvarOrderId.IsForeignKey = false;
            colvarOrderId.IsReadOnly = false;

            colvarOrderId.DefaultSetting = @"";
            colvarOrderId.ForeignKeyTableName = "";
            colvarOrderId.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderId);

            TableSchema.TableColumn colvarOrderQty = new TableSchema.TableColumn(this);
            colvarOrderQty.ColumnName = "OrderQty";
            colvarOrderQty.DataType = DbType.Int32;
            colvarOrderQty.MaxLength = 0;
            colvarOrderQty.AutoIncrement = false;
            colvarOrderQty.IsNullable = true;
            colvarOrderQty.IsPrimaryKey = false;
            colvarOrderQty.IsForeignKey = false;
            colvarOrderQty.IsReadOnly = false;

            colvarOrderQty.DefaultSetting = @"";
            colvarOrderQty.ForeignKeyTableName = "";
            colvarOrderQty.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderQty);

            TableSchema.TableColumn colvarOrderPrice = new TableSchema.TableColumn(this);
            colvarOrderPrice.ColumnName = "OrderPrice";
            colvarOrderPrice.DataType = DbType.Decimal;
            colvarOrderPrice.MaxLength = 0;
            colvarOrderPrice.AutoIncrement = false;
            colvarOrderPrice.IsNullable = true;
            colvarOrderPrice.IsPrimaryKey = false;
            colvarOrderPrice.IsForeignKey = false;
            colvarOrderPrice.IsReadOnly = false;

            colvarOrderPrice.DefaultSetting = @"";
            colvarOrderPrice.ForeignKeyTableName = "";
            colvarOrderPrice.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderPrice);

            TableSchema.TableColumn colvarIsChgPrice = new TableSchema.TableColumn(this);
            colvarIsChgPrice.ColumnName = "IsChgPrice";
            colvarIsChgPrice.DataType = DbType.Boolean;
            colvarIsChgPrice.MaxLength = 0;
            colvarIsChgPrice.AutoIncrement = false;
            colvarIsChgPrice.IsNullable = true;
            colvarIsChgPrice.IsPrimaryKey = false;
            colvarIsChgPrice.IsForeignKey = false;
            colvarIsChgPrice.IsReadOnly = false;

            colvarIsChgPrice.DefaultSetting = @"";
            colvarIsChgPrice.ForeignKeyTableName = "";
            colvarIsChgPrice.ApplyExtendedProperties();
            this.Columns.Add(colvarIsChgPrice);

            TableSchema.TableColumn colvarIsOutOfStock = new TableSchema.TableColumn(this);
            colvarIsOutOfStock.ColumnName = "IsOutOfStock";
            colvarIsOutOfStock.DataType = DbType.Boolean;
            colvarIsOutOfStock.MaxLength = 0;
            colvarIsOutOfStock.AutoIncrement = false;
            colvarIsOutOfStock.IsNullable = true;
            colvarIsOutOfStock.IsPrimaryKey = false;
            colvarIsOutOfStock.IsForeignKey = false;
            colvarIsOutOfStock.IsReadOnly = false;

            colvarIsOutOfStock.DefaultSetting = @"";
            colvarIsOutOfStock.ForeignKeyTableName = "";
            colvarIsOutOfStock.ApplyExtendedProperties();
            this.Columns.Add(colvarIsOutOfStock);

            TableSchema.TableColumn colvarItemInfo = new TableSchema.TableColumn(this);
            colvarItemInfo.ColumnName = "ItemInfo";
            colvarItemInfo.DataType = DbType.String;
            colvarItemInfo.MaxLength = -1;
            colvarItemInfo.AutoIncrement = false;
            colvarItemInfo.IsNullable = true;
            colvarItemInfo.IsPrimaryKey = false;
            colvarItemInfo.IsForeignKey = false;
            colvarItemInfo.IsReadOnly = false;

            colvarItemInfo.DefaultSetting = @"";
            colvarItemInfo.ForeignKeyTableName = "";
            colvarItemInfo.ApplyExtendedProperties();
            this.Columns.Add(colvarItemInfo);
        }
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("LAB_Temp_ResultadoEncabezado", TableType.Table, DataService.GetInstance("sicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdProtocolo = new TableSchema.TableColumn(schema);
                colvarIdProtocolo.ColumnName          = "idProtocolo";
                colvarIdProtocolo.DataType            = DbType.Int32;
                colvarIdProtocolo.MaxLength           = 0;
                colvarIdProtocolo.AutoIncrement       = false;
                colvarIdProtocolo.IsNullable          = false;
                colvarIdProtocolo.IsPrimaryKey        = true;
                colvarIdProtocolo.IsForeignKey        = false;
                colvarIdProtocolo.IsReadOnly          = false;
                colvarIdProtocolo.DefaultSetting      = @"";
                colvarIdProtocolo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdProtocolo);

                TableSchema.TableColumn colvarIdEfector = new TableSchema.TableColumn(schema);
                colvarIdEfector.ColumnName          = "idEfector";
                colvarIdEfector.DataType            = DbType.Int32;
                colvarIdEfector.MaxLength           = 0;
                colvarIdEfector.AutoIncrement       = false;
                colvarIdEfector.IsNullable          = false;
                colvarIdEfector.IsPrimaryKey        = true;
                colvarIdEfector.IsForeignKey        = false;
                colvarIdEfector.IsReadOnly          = false;
                colvarIdEfector.DefaultSetting      = @"";
                colvarIdEfector.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdEfector);

                TableSchema.TableColumn colvarApellido = new TableSchema.TableColumn(schema);
                colvarApellido.ColumnName          = "apellido";
                colvarApellido.DataType            = DbType.String;
                colvarApellido.MaxLength           = 100;
                colvarApellido.AutoIncrement       = false;
                colvarApellido.IsNullable          = false;
                colvarApellido.IsPrimaryKey        = false;
                colvarApellido.IsForeignKey        = false;
                colvarApellido.IsReadOnly          = false;
                colvarApellido.DefaultSetting      = @"";
                colvarApellido.ForeignKeyTableName = "";
                schema.Columns.Add(colvarApellido);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName          = "nombre";
                colvarNombre.DataType            = DbType.String;
                colvarNombre.MaxLength           = 100;
                colvarNombre.AutoIncrement       = false;
                colvarNombre.IsNullable          = false;
                colvarNombre.IsPrimaryKey        = false;
                colvarNombre.IsForeignKey        = false;
                colvarNombre.IsReadOnly          = false;
                colvarNombre.DefaultSetting      = @"";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarEdad = new TableSchema.TableColumn(schema);
                colvarEdad.ColumnName          = "edad";
                colvarEdad.DataType            = DbType.Int32;
                colvarEdad.MaxLength           = 0;
                colvarEdad.AutoIncrement       = false;
                colvarEdad.IsNullable          = false;
                colvarEdad.IsPrimaryKey        = false;
                colvarEdad.IsForeignKey        = false;
                colvarEdad.IsReadOnly          = false;
                colvarEdad.DefaultSetting      = @"";
                colvarEdad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEdad);

                TableSchema.TableColumn colvarUnidadEdad = new TableSchema.TableColumn(schema);
                colvarUnidadEdad.ColumnName          = "unidadEdad";
                colvarUnidadEdad.DataType            = DbType.AnsiString;
                colvarUnidadEdad.MaxLength           = 5;
                colvarUnidadEdad.AutoIncrement       = false;
                colvarUnidadEdad.IsNullable          = true;
                colvarUnidadEdad.IsPrimaryKey        = false;
                colvarUnidadEdad.IsForeignKey        = false;
                colvarUnidadEdad.IsReadOnly          = false;
                colvarUnidadEdad.DefaultSetting      = @"";
                colvarUnidadEdad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUnidadEdad);

                TableSchema.TableColumn colvarFechaNacimiento = new TableSchema.TableColumn(schema);
                colvarFechaNacimiento.ColumnName          = "fechaNacimiento";
                colvarFechaNacimiento.DataType            = DbType.AnsiString;
                colvarFechaNacimiento.MaxLength           = 10;
                colvarFechaNacimiento.AutoIncrement       = false;
                colvarFechaNacimiento.IsNullable          = true;
                colvarFechaNacimiento.IsPrimaryKey        = false;
                colvarFechaNacimiento.IsForeignKey        = false;
                colvarFechaNacimiento.IsReadOnly          = false;
                colvarFechaNacimiento.DefaultSetting      = @"";
                colvarFechaNacimiento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaNacimiento);

                TableSchema.TableColumn colvarSexo = new TableSchema.TableColumn(schema);
                colvarSexo.ColumnName          = "sexo";
                colvarSexo.DataType            = DbType.String;
                colvarSexo.MaxLength           = 1;
                colvarSexo.AutoIncrement       = false;
                colvarSexo.IsNullable          = false;
                colvarSexo.IsPrimaryKey        = false;
                colvarSexo.IsForeignKey        = false;
                colvarSexo.IsReadOnly          = false;
                colvarSexo.DefaultSetting      = @"";
                colvarSexo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSexo);

                TableSchema.TableColumn colvarNumeroDocumento = new TableSchema.TableColumn(schema);
                colvarNumeroDocumento.ColumnName          = "numeroDocumento";
                colvarNumeroDocumento.DataType            = DbType.Int32;
                colvarNumeroDocumento.MaxLength           = 0;
                colvarNumeroDocumento.AutoIncrement       = false;
                colvarNumeroDocumento.IsNullable          = false;
                colvarNumeroDocumento.IsPrimaryKey        = false;
                colvarNumeroDocumento.IsForeignKey        = false;
                colvarNumeroDocumento.IsReadOnly          = false;
                colvarNumeroDocumento.DefaultSetting      = @"";
                colvarNumeroDocumento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNumeroDocumento);

                TableSchema.TableColumn colvarFecha = new TableSchema.TableColumn(schema);
                colvarFecha.ColumnName          = "fecha";
                colvarFecha.DataType            = DbType.AnsiString;
                colvarFecha.MaxLength           = 10;
                colvarFecha.AutoIncrement       = false;
                colvarFecha.IsNullable          = true;
                colvarFecha.IsPrimaryKey        = false;
                colvarFecha.IsForeignKey        = false;
                colvarFecha.IsReadOnly          = false;
                colvarFecha.DefaultSetting      = @"";
                colvarFecha.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFecha);

                TableSchema.TableColumn colvarFecha1 = new TableSchema.TableColumn(schema);
                colvarFecha1.ColumnName          = "fecha1";
                colvarFecha1.DataType            = DbType.DateTime;
                colvarFecha1.MaxLength           = 0;
                colvarFecha1.AutoIncrement       = false;
                colvarFecha1.IsNullable          = false;
                colvarFecha1.IsPrimaryKey        = false;
                colvarFecha1.IsForeignKey        = false;
                colvarFecha1.IsReadOnly          = false;
                colvarFecha1.DefaultSetting      = @"";
                colvarFecha1.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFecha1);

                TableSchema.TableColumn colvarDomicilio = new TableSchema.TableColumn(schema);
                colvarDomicilio.ColumnName          = "domicilio";
                colvarDomicilio.DataType            = DbType.String;
                colvarDomicilio.MaxLength           = 261;
                colvarDomicilio.AutoIncrement       = false;
                colvarDomicilio.IsNullable          = true;
                colvarDomicilio.IsPrimaryKey        = false;
                colvarDomicilio.IsForeignKey        = false;
                colvarDomicilio.IsReadOnly          = false;
                colvarDomicilio.DefaultSetting      = @"";
                colvarDomicilio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDomicilio);

                TableSchema.TableColumn colvarHc = new TableSchema.TableColumn(schema);
                colvarHc.ColumnName          = "HC";
                colvarHc.DataType            = DbType.Int32;
                colvarHc.MaxLength           = 0;
                colvarHc.AutoIncrement       = false;
                colvarHc.IsNullable          = false;
                colvarHc.IsPrimaryKey        = false;
                colvarHc.IsForeignKey        = false;
                colvarHc.IsReadOnly          = false;
                colvarHc.DefaultSetting      = @"";
                colvarHc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarHc);

                TableSchema.TableColumn colvarPrioridad = new TableSchema.TableColumn(schema);
                colvarPrioridad.ColumnName          = "prioridad";
                colvarPrioridad.DataType            = DbType.String;
                colvarPrioridad.MaxLength           = 50;
                colvarPrioridad.AutoIncrement       = false;
                colvarPrioridad.IsNullable          = false;
                colvarPrioridad.IsPrimaryKey        = false;
                colvarPrioridad.IsForeignKey        = false;
                colvarPrioridad.IsReadOnly          = false;
                colvarPrioridad.DefaultSetting      = @"";
                colvarPrioridad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPrioridad);

                TableSchema.TableColumn colvarOrigen = new TableSchema.TableColumn(schema);
                colvarOrigen.ColumnName          = "origen";
                colvarOrigen.DataType            = DbType.String;
                colvarOrigen.MaxLength           = 50;
                colvarOrigen.AutoIncrement       = false;
                colvarOrigen.IsNullable          = false;
                colvarOrigen.IsPrimaryKey        = false;
                colvarOrigen.IsForeignKey        = false;
                colvarOrigen.IsReadOnly          = false;
                colvarOrigen.DefaultSetting      = @"";
                colvarOrigen.ForeignKeyTableName = "";
                schema.Columns.Add(colvarOrigen);

                TableSchema.TableColumn colvarNumero = new TableSchema.TableColumn(schema);
                colvarNumero.ColumnName          = "numero";
                colvarNumero.DataType            = DbType.AnsiString;
                colvarNumero.MaxLength           = 50;
                colvarNumero.AutoIncrement       = false;
                colvarNumero.IsNullable          = true;
                colvarNumero.IsPrimaryKey        = false;
                colvarNumero.IsForeignKey        = false;
                colvarNumero.IsReadOnly          = false;
                colvarNumero.DefaultSetting      = @"";
                colvarNumero.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNumero);

                TableSchema.TableColumn colvarHiv = new TableSchema.TableColumn(schema);
                colvarHiv.ColumnName          = "hiv";
                colvarHiv.DataType            = DbType.Boolean;
                colvarHiv.MaxLength           = 0;
                colvarHiv.AutoIncrement       = false;
                colvarHiv.IsNullable          = true;
                colvarHiv.IsPrimaryKey        = false;
                colvarHiv.IsForeignKey        = false;
                colvarHiv.IsReadOnly          = false;
                colvarHiv.DefaultSetting      = @"";
                colvarHiv.ForeignKeyTableName = "";
                schema.Columns.Add(colvarHiv);

                TableSchema.TableColumn colvarSolicitante = new TableSchema.TableColumn(schema);
                colvarSolicitante.ColumnName          = "solicitante";
                colvarSolicitante.DataType            = DbType.String;
                colvarSolicitante.MaxLength           = 205;
                colvarSolicitante.AutoIncrement       = false;
                colvarSolicitante.IsNullable          = true;
                colvarSolicitante.IsPrimaryKey        = false;
                colvarSolicitante.IsForeignKey        = false;
                colvarSolicitante.IsReadOnly          = false;
                colvarSolicitante.DefaultSetting      = @"";
                colvarSolicitante.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSolicitante);

                TableSchema.TableColumn colvarSector = new TableSchema.TableColumn(schema);
                colvarSector.ColumnName          = "sector";
                colvarSector.DataType            = DbType.AnsiString;
                colvarSector.MaxLength           = 50;
                colvarSector.AutoIncrement       = false;
                colvarSector.IsNullable          = false;
                colvarSector.IsPrimaryKey        = false;
                colvarSector.IsForeignKey        = false;
                colvarSector.IsReadOnly          = false;
                colvarSector.DefaultSetting      = @"";
                colvarSector.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSector);

                TableSchema.TableColumn colvarSala = new TableSchema.TableColumn(schema);
                colvarSala.ColumnName          = "sala";
                colvarSala.DataType            = DbType.AnsiString;
                colvarSala.MaxLength           = 50;
                colvarSala.AutoIncrement       = false;
                colvarSala.IsNullable          = false;
                colvarSala.IsPrimaryKey        = false;
                colvarSala.IsForeignKey        = false;
                colvarSala.IsReadOnly          = false;
                colvarSala.DefaultSetting      = @"";
                colvarSala.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSala);

                TableSchema.TableColumn colvarCama = new TableSchema.TableColumn(schema);
                colvarCama.ColumnName          = "cama";
                colvarCama.DataType            = DbType.AnsiString;
                colvarCama.MaxLength           = 50;
                colvarCama.AutoIncrement       = false;
                colvarCama.IsNullable          = false;
                colvarCama.IsPrimaryKey        = false;
                colvarCama.IsForeignKey        = false;
                colvarCama.IsReadOnly          = false;
                colvarCama.DefaultSetting      = @"";
                colvarCama.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCama);

                TableSchema.TableColumn colvarEmbarazo = new TableSchema.TableColumn(schema);
                colvarEmbarazo.ColumnName          = "embarazo";
                colvarEmbarazo.DataType            = DbType.AnsiString;
                colvarEmbarazo.MaxLength           = 1;
                colvarEmbarazo.AutoIncrement       = false;
                colvarEmbarazo.IsNullable          = false;
                colvarEmbarazo.IsPrimaryKey        = false;
                colvarEmbarazo.IsForeignKey        = false;
                colvarEmbarazo.IsReadOnly          = false;
                colvarEmbarazo.DefaultSetting      = @"";
                colvarEmbarazo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEmbarazo);

                TableSchema.TableColumn colvarEfectorSolicitante = new TableSchema.TableColumn(schema);
                colvarEfectorSolicitante.ColumnName          = "EfectorSolicitante";
                colvarEfectorSolicitante.DataType            = DbType.String;
                colvarEfectorSolicitante.MaxLength           = 100;
                colvarEfectorSolicitante.AutoIncrement       = false;
                colvarEfectorSolicitante.IsNullable          = false;
                colvarEfectorSolicitante.IsPrimaryKey        = false;
                colvarEfectorSolicitante.IsForeignKey        = false;
                colvarEfectorSolicitante.IsReadOnly          = false;
                colvarEfectorSolicitante.DefaultSetting      = @"";
                colvarEfectorSolicitante.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEfectorSolicitante);

                TableSchema.TableColumn colvarIdSolicitudScreening = new TableSchema.TableColumn(schema);
                colvarIdSolicitudScreening.ColumnName          = "idSolicitudScreening";
                colvarIdSolicitudScreening.DataType            = DbType.Int32;
                colvarIdSolicitudScreening.MaxLength           = 0;
                colvarIdSolicitudScreening.AutoIncrement       = false;
                colvarIdSolicitudScreening.IsNullable          = true;
                colvarIdSolicitudScreening.IsPrimaryKey        = false;
                colvarIdSolicitudScreening.IsForeignKey        = false;
                colvarIdSolicitudScreening.IsReadOnly          = false;
                colvarIdSolicitudScreening.DefaultSetting      = @"";
                colvarIdSolicitudScreening.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdSolicitudScreening);

                TableSchema.TableColumn colvarFechaRecibeScreening = new TableSchema.TableColumn(schema);
                colvarFechaRecibeScreening.ColumnName          = "fechaRecibeScreening";
                colvarFechaRecibeScreening.DataType            = DbType.DateTime;
                colvarFechaRecibeScreening.MaxLength           = 0;
                colvarFechaRecibeScreening.AutoIncrement       = false;
                colvarFechaRecibeScreening.IsNullable          = true;
                colvarFechaRecibeScreening.IsPrimaryKey        = false;
                colvarFechaRecibeScreening.IsForeignKey        = false;
                colvarFechaRecibeScreening.IsReadOnly          = false;
                colvarFechaRecibeScreening.DefaultSetting      = @"";
                colvarFechaRecibeScreening.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaRecibeScreening);

                TableSchema.TableColumn colvarObservacionesResultados = new TableSchema.TableColumn(schema);
                colvarObservacionesResultados.ColumnName          = "observacionesResultados";
                colvarObservacionesResultados.DataType            = DbType.String;
                colvarObservacionesResultados.MaxLength           = 4000;
                colvarObservacionesResultados.AutoIncrement       = false;
                colvarObservacionesResultados.IsNullable          = true;
                colvarObservacionesResultados.IsPrimaryKey        = false;
                colvarObservacionesResultados.IsForeignKey        = false;
                colvarObservacionesResultados.IsReadOnly          = false;
                colvarObservacionesResultados.DefaultSetting      = @"";
                colvarObservacionesResultados.ForeignKeyTableName = "";
                schema.Columns.Add(colvarObservacionesResultados);

                TableSchema.TableColumn colvarTipoMuestra = new TableSchema.TableColumn(schema);
                colvarTipoMuestra.ColumnName          = "tipoMuestra";
                colvarTipoMuestra.DataType            = DbType.String;
                colvarTipoMuestra.MaxLength           = 500;
                colvarTipoMuestra.AutoIncrement       = false;
                colvarTipoMuestra.IsNullable          = true;
                colvarTipoMuestra.IsPrimaryKey        = false;
                colvarTipoMuestra.IsForeignKey        = false;
                colvarTipoMuestra.IsReadOnly          = false;
                colvarTipoMuestra.DefaultSetting      = @"";
                colvarTipoMuestra.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTipoMuestra);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["sicProvider"].AddSchema("LAB_Temp_ResultadoEncabezado", schema);
            }
        }
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("APR_ControlNiñoSanoEnfermeria", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdControlNiñoSanoEnfermeria = new TableSchema.TableColumn(schema);
                colvarIdControlNiñoSanoEnfermeria.ColumnName          = "idControlNiñoSanoEnfermeria";
                colvarIdControlNiñoSanoEnfermeria.DataType            = DbType.Int32;
                colvarIdControlNiñoSanoEnfermeria.MaxLength           = 0;
                colvarIdControlNiñoSanoEnfermeria.AutoIncrement       = true;
                colvarIdControlNiñoSanoEnfermeria.IsNullable          = false;
                colvarIdControlNiñoSanoEnfermeria.IsPrimaryKey        = true;
                colvarIdControlNiñoSanoEnfermeria.IsForeignKey        = false;
                colvarIdControlNiñoSanoEnfermeria.IsReadOnly          = false;
                colvarIdControlNiñoSanoEnfermeria.DefaultSetting      = @"";
                colvarIdControlNiñoSanoEnfermeria.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdControlNiñoSanoEnfermeria);

                TableSchema.TableColumn colvarIdControlNiñoSano = new TableSchema.TableColumn(schema);
                colvarIdControlNiñoSano.ColumnName     = "idControlNiñoSano";
                colvarIdControlNiñoSano.DataType       = DbType.Int32;
                colvarIdControlNiñoSano.MaxLength      = 0;
                colvarIdControlNiñoSano.AutoIncrement  = false;
                colvarIdControlNiñoSano.IsNullable     = false;
                colvarIdControlNiñoSano.IsPrimaryKey   = false;
                colvarIdControlNiñoSano.IsForeignKey   = true;
                colvarIdControlNiñoSano.IsReadOnly     = false;
                colvarIdControlNiñoSano.DefaultSetting = @"";

                colvarIdControlNiñoSano.ForeignKeyTableName = "APR_ControlNiñoSano";
                schema.Columns.Add(colvarIdControlNiñoSano);

                TableSchema.TableColumn colvarPeso = new TableSchema.TableColumn(schema);
                colvarPeso.ColumnName          = "Peso";
                colvarPeso.DataType            = DbType.Decimal;
                colvarPeso.MaxLength           = 0;
                colvarPeso.AutoIncrement       = false;
                colvarPeso.IsNullable          = false;
                colvarPeso.IsPrimaryKey        = false;
                colvarPeso.IsForeignKey        = false;
                colvarPeso.IsReadOnly          = false;
                colvarPeso.DefaultSetting      = @"";
                colvarPeso.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPeso);

                TableSchema.TableColumn colvarTalla = new TableSchema.TableColumn(schema);
                colvarTalla.ColumnName          = "Talla";
                colvarTalla.DataType            = DbType.Decimal;
                colvarTalla.MaxLength           = 0;
                colvarTalla.AutoIncrement       = false;
                colvarTalla.IsNullable          = false;
                colvarTalla.IsPrimaryKey        = false;
                colvarTalla.IsForeignKey        = false;
                colvarTalla.IsReadOnly          = false;
                colvarTalla.DefaultSetting      = @"";
                colvarTalla.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTalla);

                TableSchema.TableColumn colvarPerimetroCefalico = new TableSchema.TableColumn(schema);
                colvarPerimetroCefalico.ColumnName          = "PerimetroCefalico";
                colvarPerimetroCefalico.DataType            = DbType.Double;
                colvarPerimetroCefalico.MaxLength           = 0;
                colvarPerimetroCefalico.AutoIncrement       = false;
                colvarPerimetroCefalico.IsNullable          = false;
                colvarPerimetroCefalico.IsPrimaryKey        = false;
                colvarPerimetroCefalico.IsForeignKey        = false;
                colvarPerimetroCefalico.IsReadOnly          = false;
                colvarPerimetroCefalico.DefaultSetting      = @"";
                colvarPerimetroCefalico.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPerimetroCefalico);

                TableSchema.TableColumn colvarIdEstadoNutricional = new TableSchema.TableColumn(schema);
                colvarIdEstadoNutricional.ColumnName     = "idEstadoNutricional";
                colvarIdEstadoNutricional.DataType       = DbType.Int32;
                colvarIdEstadoNutricional.MaxLength      = 0;
                colvarIdEstadoNutricional.AutoIncrement  = false;
                colvarIdEstadoNutricional.IsNullable     = true;
                colvarIdEstadoNutricional.IsPrimaryKey   = false;
                colvarIdEstadoNutricional.IsForeignKey   = true;
                colvarIdEstadoNutricional.IsReadOnly     = false;
                colvarIdEstadoNutricional.DefaultSetting = @"";

                colvarIdEstadoNutricional.ForeignKeyTableName = "APR_EstadoNutricional";
                schema.Columns.Add(colvarIdEstadoNutricional);

                TableSchema.TableColumn colvarIdTallaEdad = new TableSchema.TableColumn(schema);
                colvarIdTallaEdad.ColumnName     = "idTallaEdad";
                colvarIdTallaEdad.DataType       = DbType.Int32;
                colvarIdTallaEdad.MaxLength      = 0;
                colvarIdTallaEdad.AutoIncrement  = false;
                colvarIdTallaEdad.IsNullable     = true;
                colvarIdTallaEdad.IsPrimaryKey   = false;
                colvarIdTallaEdad.IsForeignKey   = true;
                colvarIdTallaEdad.IsReadOnly     = false;
                colvarIdTallaEdad.DefaultSetting = @"";

                colvarIdTallaEdad.ForeignKeyTableName = "APR_TallaEdad";
                schema.Columns.Add(colvarIdTallaEdad);

                TableSchema.TableColumn colvarIdPaciente = new TableSchema.TableColumn(schema);
                colvarIdPaciente.ColumnName          = "idPaciente";
                colvarIdPaciente.DataType            = DbType.Int32;
                colvarIdPaciente.MaxLength           = 0;
                colvarIdPaciente.AutoIncrement       = false;
                colvarIdPaciente.IsNullable          = true;
                colvarIdPaciente.IsPrimaryKey        = false;
                colvarIdPaciente.IsForeignKey        = false;
                colvarIdPaciente.IsReadOnly          = false;
                colvarIdPaciente.DefaultSetting      = @"";
                colvarIdPaciente.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdPaciente);

                TableSchema.TableColumn colvarIdProfesional = new TableSchema.TableColumn(schema);
                colvarIdProfesional.ColumnName     = "idProfesional";
                colvarIdProfesional.DataType       = DbType.Int32;
                colvarIdProfesional.MaxLength      = 0;
                colvarIdProfesional.AutoIncrement  = false;
                colvarIdProfesional.IsNullable     = true;
                colvarIdProfesional.IsPrimaryKey   = false;
                colvarIdProfesional.IsForeignKey   = true;
                colvarIdProfesional.IsReadOnly     = false;
                colvarIdProfesional.DefaultSetting = @"";

                colvarIdProfesional.ForeignKeyTableName = "Sys_Profesional";
                schema.Columns.Add(colvarIdProfesional);

                TableSchema.TableColumn colvarObservaciones = new TableSchema.TableColumn(schema);
                colvarObservaciones.ColumnName          = "observaciones";
                colvarObservaciones.DataType            = DbType.AnsiString;
                colvarObservaciones.MaxLength           = -1;
                colvarObservaciones.AutoIncrement       = false;
                colvarObservaciones.IsNullable          = true;
                colvarObservaciones.IsPrimaryKey        = false;
                colvarObservaciones.IsForeignKey        = false;
                colvarObservaciones.IsReadOnly          = false;
                colvarObservaciones.DefaultSetting      = @"";
                colvarObservaciones.ForeignKeyTableName = "";
                schema.Columns.Add(colvarObservaciones);

                TableSchema.TableColumn colvarTa = new TableSchema.TableColumn(schema);
                colvarTa.ColumnName    = "TA";
                colvarTa.DataType      = DbType.AnsiString;
                colvarTa.MaxLength     = 50;
                colvarTa.AutoIncrement = false;
                colvarTa.IsNullable    = true;
                colvarTa.IsPrimaryKey  = false;
                colvarTa.IsForeignKey  = false;
                colvarTa.IsReadOnly    = false;

                colvarTa.DefaultSetting      = @"('')";
                colvarTa.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTa);

                TableSchema.TableColumn colvarFechaControl = new TableSchema.TableColumn(schema);
                colvarFechaControl.ColumnName    = "fechaControl";
                colvarFechaControl.DataType      = DbType.DateTime;
                colvarFechaControl.MaxLength     = 0;
                colvarFechaControl.AutoIncrement = false;
                colvarFechaControl.IsNullable    = true;
                colvarFechaControl.IsPrimaryKey  = false;
                colvarFechaControl.IsForeignKey  = false;
                colvarFechaControl.IsReadOnly    = false;

                colvarFechaControl.DefaultSetting      = @"(((1)/(1))/(1900))";
                colvarFechaControl.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaControl);

                TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(schema);
                colvarCreatedBy.ColumnName          = "CreatedBy";
                colvarCreatedBy.DataType            = DbType.AnsiString;
                colvarCreatedBy.MaxLength           = 50;
                colvarCreatedBy.AutoIncrement       = false;
                colvarCreatedBy.IsNullable          = true;
                colvarCreatedBy.IsPrimaryKey        = false;
                colvarCreatedBy.IsForeignKey        = false;
                colvarCreatedBy.IsReadOnly          = false;
                colvarCreatedBy.DefaultSetting      = @"";
                colvarCreatedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedBy);

                TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(schema);
                colvarCreatedOn.ColumnName          = "CreatedOn";
                colvarCreatedOn.DataType            = DbType.DateTime;
                colvarCreatedOn.MaxLength           = 0;
                colvarCreatedOn.AutoIncrement       = false;
                colvarCreatedOn.IsNullable          = true;
                colvarCreatedOn.IsPrimaryKey        = false;
                colvarCreatedOn.IsForeignKey        = false;
                colvarCreatedOn.IsReadOnly          = false;
                colvarCreatedOn.DefaultSetting      = @"";
                colvarCreatedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedOn);

                TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(schema);
                colvarModifiedBy.ColumnName          = "ModifiedBy";
                colvarModifiedBy.DataType            = DbType.AnsiString;
                colvarModifiedBy.MaxLength           = 50;
                colvarModifiedBy.AutoIncrement       = false;
                colvarModifiedBy.IsNullable          = true;
                colvarModifiedBy.IsPrimaryKey        = false;
                colvarModifiedBy.IsForeignKey        = false;
                colvarModifiedBy.IsReadOnly          = false;
                colvarModifiedBy.DefaultSetting      = @"";
                colvarModifiedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedBy);

                TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(schema);
                colvarModifiedOn.ColumnName          = "ModifiedOn";
                colvarModifiedOn.DataType            = DbType.DateTime;
                colvarModifiedOn.MaxLength           = 0;
                colvarModifiedOn.AutoIncrement       = false;
                colvarModifiedOn.IsNullable          = true;
                colvarModifiedOn.IsPrimaryKey        = false;
                colvarModifiedOn.IsForeignKey        = false;
                colvarModifiedOn.IsReadOnly          = false;
                colvarModifiedOn.DefaultSetting      = @"";
                colvarModifiedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedOn);

                TableSchema.TableColumn colvarIcm = new TableSchema.TableColumn(schema);
                colvarIcm.ColumnName          = "ICM";
                colvarIcm.DataType            = DbType.Decimal;
                colvarIcm.MaxLength           = 0;
                colvarIcm.AutoIncrement       = false;
                colvarIcm.IsNullable          = true;
                colvarIcm.IsPrimaryKey        = false;
                colvarIcm.IsForeignKey        = false;
                colvarIcm.IsReadOnly          = true;
                colvarIcm.DefaultSetting      = @"";
                colvarIcm.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIcm);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("APR_ControlNiñoSanoEnfermeria", schema);
            }
        }
예제 #26
0
        /// <summary>
        /// Generates the command line.
        /// </summary>
        /// <returns></returns>
        public virtual string GenerateCommandLine()
        {
            StringBuilder sb = new StringBuilder();

            //start with the SqlCommand - SELECT, UPDATE, INSERT, DELETE
            sb.Append(query.SQLCommand);
            string columnList;

            if (query.Aggregates.Count > 0)
            {
                columnList = BuildAggregateCommands();
            }
            else
            {
                //set "TOP"
                sb.Append(query.TopSpec);

                //decide the columns
                if (query.SelectColumnList.Length == 0)
                {
                    columnList = GenerateSelectColumnList();
                }
                else
                {
                    StringBuilder sbCols = new StringBuilder();
                    //loop each column -
                    //there n tables in the select list
                    //need to get the schema
                    //so for each column, loop the FromList until we find the column
                    bool isFirst = true;
                    foreach (string s in query.SelectColumnList)
                    {
                        if (!isFirst)
                        {
                            sbCols.Append(", ");
                        }
                        isFirst = false;
                        //find the column
                        TableSchema.TableColumn c = FindColumn(s);

                        if (c != null)
                        {
                            sbCols.Append(c.QualifiedName);
                        }
                        else
                        {
                            //just append it in - allowing for function calls
                            //or literals in the command line
                            sbCols.Append(s);
                        }
                    }
                    columnList = sbCols.ToString();
                }
            }
            sb.Append(columnList);

            if (query.Expressions.Count > 0)
            {
                //add in expression
                foreach (string s in query.Expressions)
                {
                    sb.Append(",");
                    sb.Append(s);
                }
            }
            sb.AppendLine();

            string result = sb.ToString();

            return(result);
        }
        public void Add_Column()
        {
            TableSchema.Table productSchema = Product.Schema;
            TableSchema.TableColumn column = new TableSchema.TableColumn(productSchema);
            column.ColumnName = "Address4";
            column.DataType = DbType.String;
            column.MaxLength = 50;
            column.IsNullable = true;

            ANSISqlGenerator gen = new ANSISqlGenerator(null);
            string sql = gen.BuildAddColumnStatement(Product.Schema, column);
            Assert.AreEqual("ALTER TABLE [dbo].[Products] ADD [Address4] nvarchar(50) NULL", sql);
        }
예제 #28
0
        private void BuildConstraintSQL(ref string constraintOperator, StringBuilder sb, bool isFirst, ref bool expressionIsOpen, Constraint c)
        {
            string columnName  = String.Empty;
            bool   foundColumn = false;

            if (c.ConstructionFragment == c.ColumnName && c.ConstructionFragment != "##")
            {
                TableSchema.TableColumn col = FindColumn(c.ColumnName);

                if (c.Column != null)
                {
                    columnName      = c.Column.QualifiedName;
                    foundColumn     = true;
                    c.ParameterName = col.ParameterName;
                }
                else
                {
                    if (col != null)
                    {
                        columnName      = col.QualifiedName;
                        c.DbType        = col.DataType;
                        foundColumn     = true;
                        c.ParameterName = String.Concat(col.ParameterName, query.Constraints.IndexOf(c));
                    }
                }
            }

            if (!foundColumn && c.ConstructionFragment != "##")
            {
                bool isAggregate = false;
                //this could be an expression
                string rawColumnName = c.ConstructionFragment;
                if (c.ConstructionFragment.StartsWith("("))
                {
                    rawColumnName    = c.ConstructionFragment.Replace("(", String.Empty);
                    expressionIsOpen = true;
                }
                //this could be an aggregate function

                else if (c.IsAggregate || (c.ConstructionFragment.Contains("(") && c.ConstructionFragment.Contains(")")))
                {
                    rawColumnName = c.ConstructionFragment.Replace("(", String.Empty).Replace(")", String.Empty);
                    isAggregate   = true;
                }

                TableSchema.TableColumn col = FindColumn(c.ColumnName);
                if (!isAggregate && col != null)
                {
                    columnName      = Utility.FastReplace(c.ConstructionFragment, col.ColumnName, col.QualifiedName, StringComparison.InvariantCultureIgnoreCase);
                    c.ParameterName = String.Concat(col.ParameterName, query.Constraints.IndexOf(c));
                    c.DbType        = col.DataType;
                }
                else
                {
                    c.ParameterName = Utility.PrefixParameter(rawColumnName, query.Provider) + query.Constraints.IndexOf(c);
                    columnName      = c.ConstructionFragment;
                }
            }

            //paramCount++;

            if (!isFirst)
            {
                constraintOperator = Enum.GetName(typeof(ConstraintType), c.Condition);
                constraintOperator = String.Concat(" ", constraintOperator.ToUpper(), " ");
            }

            if (c.Comparison != Comparison.OpenParentheses && c.Comparison != Comparison.CloseParentheses)
            {
                sb.Append(constraintOperator);
            }

            if (c.Comparison == Comparison.BetweenAnd)
            {
                sb.Append(columnName);
                sb.Append(SqlFragment.BETWEEN);
                sb.Append(c.ParameterName + "_start");
                sb.Append(SqlFragment.AND);
                sb.Append(c.ParameterName + "_end");
            }
            else if (c.Comparison == Comparison.In || c.Comparison == Comparison.NotIn)
            {
                sb.Append(columnName);
                if (c.Comparison == Comparison.In)
                {
                    sb.Append(SqlFragment.IN);
                }
                else
                {
                    sb.Append(SqlFragment.NOT_IN);
                }

                sb.Append("(");

                if (c.InSelect != null)
                {
                    //create a sql statement from the passed-in select
                    string sql = c.InSelect.BuildSqlStatement();
                    sb.Append(sql);
                }
                else
                {
                    //enumerate INs
                    IEnumerator   en   = c.InValues.GetEnumerator();
                    StringBuilder sbIn = new StringBuilder();
                    int           i    = 1;
                    while (en.MoveNext())
                    {
                        sbIn.Append(String.Concat(c.ParameterName, "In", i, ","));
                        i++;
                    }
                    string inList = sbIn.ToString();
                    inList = Strings.Chop(inList);
                    sb.Append(inList);
                }

                sb.Append(")");
            }
            else if (c.Comparison == Comparison.OpenParentheses)
            {
                expressionIsOpen = true;
                sb.Append("(");
            }
            else if (c.Comparison == Comparison.CloseParentheses)
            {
                expressionIsOpen = false;
                sb.Append(")");
            }
            else
            {
                if (columnName.StartsWith("("))
                {
                    expressionIsOpen = true;
                }
                if (c.ConstructionFragment != "##")
                {
                    sb.Append(columnName);
                    sb.Append(Constraint.GetComparisonOperator(c.Comparison));
                    if (c.Comparison == Comparison.Is || c.Comparison == Comparison.IsNot)
                    {
                        if (c.ParameterValue == null || c.ParameterValue == DBNull.Value)
                        {
                            sb.Append("NULL");
                        }
                    }
                    else
                    {
                        sb.Append(c.ParameterName);
                    }
                }
            }

            sb.AppendLine(String.Empty);
        }
예제 #29
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = false;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = false;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarMemberEmail = new TableSchema.TableColumn(this);
            colvarMemberEmail.ColumnName = "MemberEmail";
            colvarMemberEmail.DataType = DbType.String;
            colvarMemberEmail.MaxLength = 50;
            colvarMemberEmail.AutoIncrement = false;
            colvarMemberEmail.IsNullable = true;
            colvarMemberEmail.IsPrimaryKey = false;
            colvarMemberEmail.IsForeignKey = false;
            colvarMemberEmail.IsReadOnly = false;

            colvarMemberEmail.DefaultSetting = @"";
            colvarMemberEmail.ForeignKeyTableName = "";
            colvarMemberEmail.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberEmail);

            TableSchema.TableColumn colvarMemberFullname = new TableSchema.TableColumn(this);
            colvarMemberFullname.ColumnName = "MemberFullname";
            colvarMemberFullname.DataType = DbType.String;
            colvarMemberFullname.MaxLength = 50;
            colvarMemberFullname.AutoIncrement = false;
            colvarMemberFullname.IsNullable = true;
            colvarMemberFullname.IsPrimaryKey = false;
            colvarMemberFullname.IsForeignKey = false;
            colvarMemberFullname.IsReadOnly = false;

            colvarMemberFullname.DefaultSetting = @"";
            colvarMemberFullname.ForeignKeyTableName = "";
            colvarMemberFullname.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberFullname);

            TableSchema.TableColumn colvarMemberPwd = new TableSchema.TableColumn(this);
            colvarMemberPwd.ColumnName = "MemberPwd";
            colvarMemberPwd.DataType = DbType.String;
            colvarMemberPwd.MaxLength = 50;
            colvarMemberPwd.AutoIncrement = false;
            colvarMemberPwd.IsNullable = false;
            colvarMemberPwd.IsPrimaryKey = false;
            colvarMemberPwd.IsForeignKey = false;
            colvarMemberPwd.IsReadOnly = false;

            colvarMemberPwd.DefaultSetting = @"";
            colvarMemberPwd.ForeignKeyTableName = "";
            colvarMemberPwd.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberPwd);

            TableSchema.TableColumn colvarMemberFinger = new TableSchema.TableColumn(this);
            colvarMemberFinger.ColumnName = "MemberFinger";
            colvarMemberFinger.DataType = DbType.AnsiString;
            colvarMemberFinger.MaxLength = 600;
            colvarMemberFinger.AutoIncrement = false;
            colvarMemberFinger.IsNullable = true;
            colvarMemberFinger.IsPrimaryKey = false;
            colvarMemberFinger.IsForeignKey = false;
            colvarMemberFinger.IsReadOnly = false;

            colvarMemberFinger.DefaultSetting = @"";
            colvarMemberFinger.ForeignKeyTableName = "";
            colvarMemberFinger.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberFinger);

            TableSchema.TableColumn colvarMemberPhoneNumber = new TableSchema.TableColumn(this);
            colvarMemberPhoneNumber.ColumnName = "MemberPhoneNumber";
            colvarMemberPhoneNumber.DataType = DbType.String;
            colvarMemberPhoneNumber.MaxLength = 50;
            colvarMemberPhoneNumber.AutoIncrement = false;
            colvarMemberPhoneNumber.IsNullable = false;
            colvarMemberPhoneNumber.IsPrimaryKey = false;
            colvarMemberPhoneNumber.IsForeignKey = false;
            colvarMemberPhoneNumber.IsReadOnly = false;

            colvarMemberPhoneNumber.DefaultSetting = @"";
            colvarMemberPhoneNumber.ForeignKeyTableName = "";
            colvarMemberPhoneNumber.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberPhoneNumber);

            TableSchema.TableColumn colvarMemberGrade = new TableSchema.TableColumn(this);
            colvarMemberGrade.ColumnName = "MemberGrade";
            colvarMemberGrade.DataType = DbType.Int32;
            colvarMemberGrade.MaxLength = 0;
            colvarMemberGrade.AutoIncrement = false;
            colvarMemberGrade.IsNullable = true;
            colvarMemberGrade.IsPrimaryKey = false;
            colvarMemberGrade.IsForeignKey = false;
            colvarMemberGrade.IsReadOnly = false;

            colvarMemberGrade.DefaultSetting = @"";
            colvarMemberGrade.ForeignKeyTableName = "";
            colvarMemberGrade.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberGrade);

            TableSchema.TableColumn colvarMemberAddress1 = new TableSchema.TableColumn(this);
            colvarMemberAddress1.ColumnName = "MemberAddress1";
            colvarMemberAddress1.DataType = DbType.String;
            colvarMemberAddress1.MaxLength = 200;
            colvarMemberAddress1.AutoIncrement = false;
            colvarMemberAddress1.IsNullable = true;
            colvarMemberAddress1.IsPrimaryKey = false;
            colvarMemberAddress1.IsForeignKey = false;
            colvarMemberAddress1.IsReadOnly = false;

            colvarMemberAddress1.DefaultSetting = @"";
            colvarMemberAddress1.ForeignKeyTableName = "";
            colvarMemberAddress1.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberAddress1);

            TableSchema.TableColumn colvarMemberAddress2 = new TableSchema.TableColumn(this);
            colvarMemberAddress2.ColumnName = "MemberAddress2";
            colvarMemberAddress2.DataType = DbType.String;
            colvarMemberAddress2.MaxLength = 200;
            colvarMemberAddress2.AutoIncrement = false;
            colvarMemberAddress2.IsNullable = true;
            colvarMemberAddress2.IsPrimaryKey = false;
            colvarMemberAddress2.IsForeignKey = false;
            colvarMemberAddress2.IsReadOnly = false;

            colvarMemberAddress2.DefaultSetting = @"";
            colvarMemberAddress2.ForeignKeyTableName = "";
            colvarMemberAddress2.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberAddress2);

            TableSchema.TableColumn colvarMemberCountry = new TableSchema.TableColumn(this);
            colvarMemberCountry.ColumnName = "MemberCountry";
            colvarMemberCountry.DataType = DbType.String;
            colvarMemberCountry.MaxLength = 50;
            colvarMemberCountry.AutoIncrement = false;
            colvarMemberCountry.IsNullable = true;
            colvarMemberCountry.IsPrimaryKey = false;
            colvarMemberCountry.IsForeignKey = false;
            colvarMemberCountry.IsReadOnly = false;

            colvarMemberCountry.DefaultSetting = @"";
            colvarMemberCountry.ForeignKeyTableName = "";
            colvarMemberCountry.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCountry);

            TableSchema.TableColumn colvarMemberState = new TableSchema.TableColumn(this);
            colvarMemberState.ColumnName = "MemberState";
            colvarMemberState.DataType = DbType.String;
            colvarMemberState.MaxLength = 50;
            colvarMemberState.AutoIncrement = false;
            colvarMemberState.IsNullable = true;
            colvarMemberState.IsPrimaryKey = false;
            colvarMemberState.IsForeignKey = false;
            colvarMemberState.IsReadOnly = false;

            colvarMemberState.DefaultSetting = @"";
            colvarMemberState.ForeignKeyTableName = "";
            colvarMemberState.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberState);

            TableSchema.TableColumn colvarMemberCity = new TableSchema.TableColumn(this);
            colvarMemberCity.ColumnName = "MemberCity";
            colvarMemberCity.DataType = DbType.Int32;
            colvarMemberCity.MaxLength = 0;
            colvarMemberCity.AutoIncrement = false;
            colvarMemberCity.IsNullable = true;
            colvarMemberCity.IsPrimaryKey = false;
            colvarMemberCity.IsForeignKey = false;
            colvarMemberCity.IsReadOnly = false;

            colvarMemberCity.DefaultSetting = @"";
            colvarMemberCity.ForeignKeyTableName = "";
            colvarMemberCity.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCity);

            TableSchema.TableColumn colvarMemberZip = new TableSchema.TableColumn(this);
            colvarMemberZip.ColumnName = "MemberZip";
            colvarMemberZip.DataType = DbType.String;
            colvarMemberZip.MaxLength = 50;
            colvarMemberZip.AutoIncrement = false;
            colvarMemberZip.IsNullable = true;
            colvarMemberZip.IsPrimaryKey = false;
            colvarMemberZip.IsForeignKey = false;
            colvarMemberZip.IsReadOnly = false;

            colvarMemberZip.DefaultSetting = @"";
            colvarMemberZip.ForeignKeyTableName = "";
            colvarMemberZip.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberZip);

            TableSchema.TableColumn colvarMemberDate = new TableSchema.TableColumn(this);
            colvarMemberDate.ColumnName = "MemberDate";
            colvarMemberDate.DataType = DbType.DateTime;
            colvarMemberDate.MaxLength = 0;
            colvarMemberDate.AutoIncrement = false;
            colvarMemberDate.IsNullable = true;
            colvarMemberDate.IsPrimaryKey = false;
            colvarMemberDate.IsForeignKey = false;
            colvarMemberDate.IsReadOnly = false;

            colvarMemberDate.DefaultSetting = @"";
            colvarMemberDate.ForeignKeyTableName = "";
            colvarMemberDate.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberDate);

            TableSchema.TableColumn colvarMemberSum = new TableSchema.TableColumn(this);
            colvarMemberSum.ColumnName = "MemberSum";
            colvarMemberSum.DataType = DbType.Decimal;
            colvarMemberSum.MaxLength = 0;
            colvarMemberSum.AutoIncrement = false;
            colvarMemberSum.IsNullable = true;
            colvarMemberSum.IsPrimaryKey = false;
            colvarMemberSum.IsForeignKey = false;
            colvarMemberSum.IsReadOnly = false;

            colvarMemberSum.DefaultSetting = @"";
            colvarMemberSum.ForeignKeyTableName = "";
            colvarMemberSum.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberSum);

            TableSchema.TableColumn colvarMemberBalance = new TableSchema.TableColumn(this);
            colvarMemberBalance.ColumnName = "MemberBalance";
            colvarMemberBalance.DataType = DbType.Decimal;
            colvarMemberBalance.MaxLength = 0;
            colvarMemberBalance.AutoIncrement = false;
            colvarMemberBalance.IsNullable = true;
            colvarMemberBalance.IsPrimaryKey = false;
            colvarMemberBalance.IsForeignKey = false;
            colvarMemberBalance.IsReadOnly = false;

            colvarMemberBalance.DefaultSetting = @"";
            colvarMemberBalance.ForeignKeyTableName = "";
            colvarMemberBalance.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberBalance);

            TableSchema.TableColumn colvarMemberBalanceCash = new TableSchema.TableColumn(this);
            colvarMemberBalanceCash.ColumnName = "MemberBalanceCash";
            colvarMemberBalanceCash.DataType = DbType.Decimal;
            colvarMemberBalanceCash.MaxLength = 0;
            colvarMemberBalanceCash.AutoIncrement = false;
            colvarMemberBalanceCash.IsNullable = true;
            colvarMemberBalanceCash.IsPrimaryKey = false;
            colvarMemberBalanceCash.IsForeignKey = false;
            colvarMemberBalanceCash.IsReadOnly = false;

            colvarMemberBalanceCash.DefaultSetting = @"";
            colvarMemberBalanceCash.ForeignKeyTableName = "";
            colvarMemberBalanceCash.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberBalanceCash);

            TableSchema.TableColumn colvarMemberStatus = new TableSchema.TableColumn(this);
            colvarMemberStatus.ColumnName = "MemberStatus";
            colvarMemberStatus.DataType = DbType.Int32;
            colvarMemberStatus.MaxLength = 0;
            colvarMemberStatus.AutoIncrement = false;
            colvarMemberStatus.IsNullable = true;
            colvarMemberStatus.IsPrimaryKey = false;
            colvarMemberStatus.IsForeignKey = false;
            colvarMemberStatus.IsReadOnly = false;

            colvarMemberStatus.DefaultSetting = @"";
            colvarMemberStatus.ForeignKeyTableName = "";
            colvarMemberStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberStatus);

            TableSchema.TableColumn colvarMemberMemo = new TableSchema.TableColumn(this);
            colvarMemberMemo.ColumnName = "MemberMemo";
            colvarMemberMemo.DataType = DbType.String;
            colvarMemberMemo.MaxLength = 50;
            colvarMemberMemo.AutoIncrement = false;
            colvarMemberMemo.IsNullable = true;
            colvarMemberMemo.IsPrimaryKey = false;
            colvarMemberMemo.IsForeignKey = false;
            colvarMemberMemo.IsReadOnly = false;

            colvarMemberMemo.DefaultSetting = @"";
            colvarMemberMemo.ForeignKeyTableName = "";
            colvarMemberMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberMemo);

            TableSchema.TableColumn colvarMemberPid = new TableSchema.TableColumn(this);
            colvarMemberPid.ColumnName = "MemberPid";
            colvarMemberPid.DataType = DbType.Int32;
            colvarMemberPid.MaxLength = 0;
            colvarMemberPid.AutoIncrement = false;
            colvarMemberPid.IsNullable = true;
            colvarMemberPid.IsPrimaryKey = false;
            colvarMemberPid.IsForeignKey = false;
            colvarMemberPid.IsReadOnly = false;

            colvarMemberPid.DefaultSetting = @"";
            colvarMemberPid.ForeignKeyTableName = "";
            colvarMemberPid.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberPid);

            TableSchema.TableColumn colvarMemberCompanyID = new TableSchema.TableColumn(this);
            colvarMemberCompanyID.ColumnName = "MemberCompanyID";
            colvarMemberCompanyID.DataType = DbType.Int32;
            colvarMemberCompanyID.MaxLength = 0;
            colvarMemberCompanyID.AutoIncrement = false;
            colvarMemberCompanyID.IsNullable = true;
            colvarMemberCompanyID.IsPrimaryKey = false;
            colvarMemberCompanyID.IsForeignKey = false;
            colvarMemberCompanyID.IsReadOnly = false;

            colvarMemberCompanyID.DefaultSetting = @"";
            colvarMemberCompanyID.ForeignKeyTableName = "";
            colvarMemberCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberCompanyID);

            TableSchema.TableColumn colvarMemberSex = new TableSchema.TableColumn(this);
            colvarMemberSex.ColumnName = "MemberSex";
            colvarMemberSex.DataType = DbType.Boolean;
            colvarMemberSex.MaxLength = 0;
            colvarMemberSex.AutoIncrement = false;
            colvarMemberSex.IsNullable = true;
            colvarMemberSex.IsPrimaryKey = false;
            colvarMemberSex.IsForeignKey = false;
            colvarMemberSex.IsReadOnly = false;

            colvarMemberSex.DefaultSetting = @"";
            colvarMemberSex.ForeignKeyTableName = "";
            colvarMemberSex.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberSex);

            TableSchema.TableColumn colvarMemberBirthday = new TableSchema.TableColumn(this);
            colvarMemberBirthday.ColumnName = "MemberBirthday";
            colvarMemberBirthday.DataType = DbType.DateTime;
            colvarMemberBirthday.MaxLength = 0;
            colvarMemberBirthday.AutoIncrement = false;
            colvarMemberBirthday.IsNullable = true;
            colvarMemberBirthday.IsPrimaryKey = false;
            colvarMemberBirthday.IsForeignKey = false;
            colvarMemberBirthday.IsReadOnly = false;

            colvarMemberBirthday.DefaultSetting = @"";
            colvarMemberBirthday.ForeignKeyTableName = "";
            colvarMemberBirthday.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberBirthday);

            TableSchema.TableColumn colvarMemberRoleId = new TableSchema.TableColumn(this);
            colvarMemberRoleId.ColumnName = "MemberRole_ID";
            colvarMemberRoleId.DataType = DbType.Int32;
            colvarMemberRoleId.MaxLength = 0;
            colvarMemberRoleId.AutoIncrement = false;
            colvarMemberRoleId.IsNullable = true;
            colvarMemberRoleId.IsPrimaryKey = false;
            colvarMemberRoleId.IsForeignKey = false;
            colvarMemberRoleId.IsReadOnly = false;

            colvarMemberRoleId.DefaultSetting = @"";
            colvarMemberRoleId.ForeignKeyTableName = "";
            colvarMemberRoleId.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberRoleId);

            TableSchema.TableColumn colvarCompanyRoleId = new TableSchema.TableColumn(this);
            colvarCompanyRoleId.ColumnName = "CompanyRole_ID";
            colvarCompanyRoleId.DataType = DbType.Int32;
            colvarCompanyRoleId.MaxLength = 0;
            colvarCompanyRoleId.AutoIncrement = false;
            colvarCompanyRoleId.IsNullable = true;
            colvarCompanyRoleId.IsPrimaryKey = false;
            colvarCompanyRoleId.IsForeignKey = false;
            colvarCompanyRoleId.IsReadOnly = false;

            colvarCompanyRoleId.DefaultSetting = @"";
            colvarCompanyRoleId.ForeignKeyTableName = "";
            colvarCompanyRoleId.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyRoleId);

            TableSchema.TableColumn colvarAdminRoleId = new TableSchema.TableColumn(this);
            colvarAdminRoleId.ColumnName = "AdminRole_ID";
            colvarAdminRoleId.DataType = DbType.Int32;
            colvarAdminRoleId.MaxLength = 0;
            colvarAdminRoleId.AutoIncrement = false;
            colvarAdminRoleId.IsNullable = true;
            colvarAdminRoleId.IsPrimaryKey = false;
            colvarAdminRoleId.IsForeignKey = false;
            colvarAdminRoleId.IsReadOnly = false;

            colvarAdminRoleId.DefaultSetting = @"";
            colvarAdminRoleId.ForeignKeyTableName = "";
            colvarAdminRoleId.ApplyExtendedProperties();
            this.Columns.Add(colvarAdminRoleId);

            TableSchema.TableColumn colvarLastLoginDate = new TableSchema.TableColumn(this);
            colvarLastLoginDate.ColumnName = "LastLoginDate";
            colvarLastLoginDate.DataType = DbType.DateTime;
            colvarLastLoginDate.MaxLength = 0;
            colvarLastLoginDate.AutoIncrement = false;
            colvarLastLoginDate.IsNullable = true;
            colvarLastLoginDate.IsPrimaryKey = false;
            colvarLastLoginDate.IsForeignKey = false;
            colvarLastLoginDate.IsReadOnly = false;

            colvarLastLoginDate.DefaultSetting = @"";
            colvarLastLoginDate.ForeignKeyTableName = "";
            colvarLastLoginDate.ApplyExtendedProperties();
            this.Columns.Add(colvarLastLoginDate);

            TableSchema.TableColumn colvarLastLoginSubSys = new TableSchema.TableColumn(this);
            colvarLastLoginSubSys.ColumnName = "LastLoginSubSys";
            colvarLastLoginSubSys.DataType = DbType.Int32;
            colvarLastLoginSubSys.MaxLength = 0;
            colvarLastLoginSubSys.AutoIncrement = false;
            colvarLastLoginSubSys.IsNullable = true;
            colvarLastLoginSubSys.IsPrimaryKey = false;
            colvarLastLoginSubSys.IsForeignKey = false;
            colvarLastLoginSubSys.IsReadOnly = false;

            colvarLastLoginSubSys.DefaultSetting = @"";
            colvarLastLoginSubSys.ForeignKeyTableName = "";
            colvarLastLoginSubSys.ApplyExtendedProperties();
            this.Columns.Add(colvarLastLoginSubSys);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);

            TableSchema.TableColumn colvarCompanyId = new TableSchema.TableColumn(this);
            colvarCompanyId.ColumnName = "Company_ID";
            colvarCompanyId.DataType = DbType.Int32;
            colvarCompanyId.MaxLength = 0;
            colvarCompanyId.AutoIncrement = false;
            colvarCompanyId.IsNullable = true;
            colvarCompanyId.IsPrimaryKey = false;
            colvarCompanyId.IsForeignKey = false;
            colvarCompanyId.IsReadOnly = false;

            colvarCompanyId.DefaultSetting = @"";
            colvarCompanyId.ForeignKeyTableName = "";
            colvarCompanyId.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyId);

            TableSchema.TableColumn colvarMemberArea = new TableSchema.TableColumn(this);
            colvarMemberArea.ColumnName = "MemberArea";
            colvarMemberArea.DataType = DbType.String;
            colvarMemberArea.MaxLength = 50;
            colvarMemberArea.AutoIncrement = false;
            colvarMemberArea.IsNullable = true;
            colvarMemberArea.IsPrimaryKey = false;
            colvarMemberArea.IsForeignKey = false;
            colvarMemberArea.IsReadOnly = false;

            colvarMemberArea.DefaultSetting = @"";
            colvarMemberArea.ForeignKeyTableName = "";
            colvarMemberArea.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberArea);
        }
예제 #30
0
        public virtual string BuildForeignKeyDropStatement(TableSchema.TableColumn oneTable, TableSchema.TableColumn manyTable)
        {
            if (oneTable == null)
            {
                throw new InvalidOperationException("From column cannot be null");
            }

            if (manyTable == null)
            {
                throw new InvalidOperationException("To column cannot be null");
            }

            const string sqlFormat = "ALTER TABLE {0} DROP CONSTRAINT {1}";
            string       fkName    = string.Format("fk_{0}_{1}", oneTable.Table.Name, manyTable.Table.Name);
            string       sql       = string.Format(sqlFormat, manyTable.Table.QualifiedName, fkName);

            return(sql);
        }
예제 #31
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("vw_aspnet_Users", TableType.View, DataService.GetInstance("ViewWeb"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarApplicationId = new TableSchema.TableColumn(schema);
                colvarApplicationId.ColumnName    = "ApplicationId";
                colvarApplicationId.DataType      = DbType.Guid;
                colvarApplicationId.MaxLength     = 0;
                colvarApplicationId.AutoIncrement = false;
                colvarApplicationId.IsNullable    = false;
                colvarApplicationId.IsPrimaryKey  = false;
                colvarApplicationId.IsForeignKey  = false;
                colvarApplicationId.IsReadOnly    = false;

                schema.Columns.Add(colvarApplicationId);

                TableSchema.TableColumn colvarUserId = new TableSchema.TableColumn(schema);
                colvarUserId.ColumnName    = "UserId";
                colvarUserId.DataType      = DbType.Guid;
                colvarUserId.MaxLength     = 0;
                colvarUserId.AutoIncrement = false;
                colvarUserId.IsNullable    = false;
                colvarUserId.IsPrimaryKey  = false;
                colvarUserId.IsForeignKey  = false;
                colvarUserId.IsReadOnly    = false;

                schema.Columns.Add(colvarUserId);

                TableSchema.TableColumn colvarUserName = new TableSchema.TableColumn(schema);
                colvarUserName.ColumnName    = "UserName";
                colvarUserName.DataType      = DbType.String;
                colvarUserName.MaxLength     = 256;
                colvarUserName.AutoIncrement = false;
                colvarUserName.IsNullable    = false;
                colvarUserName.IsPrimaryKey  = false;
                colvarUserName.IsForeignKey  = false;
                colvarUserName.IsReadOnly    = false;

                schema.Columns.Add(colvarUserName);

                TableSchema.TableColumn colvarLoweredUserName = new TableSchema.TableColumn(schema);
                colvarLoweredUserName.ColumnName    = "LoweredUserName";
                colvarLoweredUserName.DataType      = DbType.String;
                colvarLoweredUserName.MaxLength     = 256;
                colvarLoweredUserName.AutoIncrement = false;
                colvarLoweredUserName.IsNullable    = false;
                colvarLoweredUserName.IsPrimaryKey  = false;
                colvarLoweredUserName.IsForeignKey  = false;
                colvarLoweredUserName.IsReadOnly    = false;

                schema.Columns.Add(colvarLoweredUserName);

                TableSchema.TableColumn colvarMobileAlias = new TableSchema.TableColumn(schema);
                colvarMobileAlias.ColumnName    = "MobileAlias";
                colvarMobileAlias.DataType      = DbType.String;
                colvarMobileAlias.MaxLength     = 16;
                colvarMobileAlias.AutoIncrement = false;
                colvarMobileAlias.IsNullable    = true;
                colvarMobileAlias.IsPrimaryKey  = false;
                colvarMobileAlias.IsForeignKey  = false;
                colvarMobileAlias.IsReadOnly    = false;

                schema.Columns.Add(colvarMobileAlias);

                TableSchema.TableColumn colvarIsAnonymous = new TableSchema.TableColumn(schema);
                colvarIsAnonymous.ColumnName    = "IsAnonymous";
                colvarIsAnonymous.DataType      = DbType.Boolean;
                colvarIsAnonymous.MaxLength     = 0;
                colvarIsAnonymous.AutoIncrement = false;
                colvarIsAnonymous.IsNullable    = false;
                colvarIsAnonymous.IsPrimaryKey  = false;
                colvarIsAnonymous.IsForeignKey  = false;
                colvarIsAnonymous.IsReadOnly    = false;

                schema.Columns.Add(colvarIsAnonymous);

                TableSchema.TableColumn colvarLastActivityDate = new TableSchema.TableColumn(schema);
                colvarLastActivityDate.ColumnName    = "LastActivityDate";
                colvarLastActivityDate.DataType      = DbType.DateTime;
                colvarLastActivityDate.MaxLength     = 0;
                colvarLastActivityDate.AutoIncrement = false;
                colvarLastActivityDate.IsNullable    = false;
                colvarLastActivityDate.IsPrimaryKey  = false;
                colvarLastActivityDate.IsForeignKey  = false;
                colvarLastActivityDate.IsReadOnly    = false;

                schema.Columns.Add(colvarLastActivityDate);


                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["ViewWeb"].AddSchema("vw_aspnet_Users", schema);
            }
        }
예제 #32
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("TblThongBao", TableType.Table, DataService.GetInstance("ViewWeb"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "Id";
                colvarId.DataType            = DbType.Guid;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = false;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarIdNhanVien = new TableSchema.TableColumn(schema);
                colvarIdNhanVien.ColumnName     = "IdNhanVien";
                colvarIdNhanVien.DataType       = DbType.Guid;
                colvarIdNhanVien.MaxLength      = 0;
                colvarIdNhanVien.AutoIncrement  = false;
                colvarIdNhanVien.IsNullable     = false;
                colvarIdNhanVien.IsPrimaryKey   = false;
                colvarIdNhanVien.IsForeignKey   = true;
                colvarIdNhanVien.IsReadOnly     = false;
                colvarIdNhanVien.DefaultSetting = @"";

                colvarIdNhanVien.ForeignKeyTableName = "TblNhanVien";
                schema.Columns.Add(colvarIdNhanVien);

                TableSchema.TableColumn colvarThoiGian = new TableSchema.TableColumn(schema);
                colvarThoiGian.ColumnName          = "ThoiGian";
                colvarThoiGian.DataType            = DbType.DateTime;
                colvarThoiGian.MaxLength           = 0;
                colvarThoiGian.AutoIncrement       = false;
                colvarThoiGian.IsNullable          = false;
                colvarThoiGian.IsPrimaryKey        = false;
                colvarThoiGian.IsForeignKey        = false;
                colvarThoiGian.IsReadOnly          = false;
                colvarThoiGian.DefaultSetting      = @"";
                colvarThoiGian.ForeignKeyTableName = "";
                schema.Columns.Add(colvarThoiGian);

                TableSchema.TableColumn colvarIdVanPhong = new TableSchema.TableColumn(schema);
                colvarIdVanPhong.ColumnName     = "IdVanPhong";
                colvarIdVanPhong.DataType       = DbType.Guid;
                colvarIdVanPhong.MaxLength      = 0;
                colvarIdVanPhong.AutoIncrement  = false;
                colvarIdVanPhong.IsNullable     = false;
                colvarIdVanPhong.IsPrimaryKey   = false;
                colvarIdVanPhong.IsForeignKey   = true;
                colvarIdVanPhong.IsReadOnly     = false;
                colvarIdVanPhong.DefaultSetting = @"";

                colvarIdVanPhong.ForeignKeyTableName = "TblVanPhong";
                schema.Columns.Add(colvarIdVanPhong);

                TableSchema.TableColumn colvarMoTa = new TableSchema.TableColumn(schema);
                colvarMoTa.ColumnName     = "MoTa";
                colvarMoTa.DataType       = DbType.Guid;
                colvarMoTa.MaxLength      = 0;
                colvarMoTa.AutoIncrement  = false;
                colvarMoTa.IsNullable     = false;
                colvarMoTa.IsPrimaryKey   = false;
                colvarMoTa.IsForeignKey   = true;
                colvarMoTa.IsReadOnly     = false;
                colvarMoTa.DefaultSetting = @"";

                colvarMoTa.ForeignKeyTableName = "TblMauThongBao";
                schema.Columns.Add(colvarMoTa);

                TableSchema.TableColumn colvarNgayTao = new TableSchema.TableColumn(schema);
                colvarNgayTao.ColumnName          = "NgayTao";
                colvarNgayTao.DataType            = DbType.DateTime;
                colvarNgayTao.MaxLength           = 0;
                colvarNgayTao.AutoIncrement       = false;
                colvarNgayTao.IsNullable          = false;
                colvarNgayTao.IsPrimaryKey        = false;
                colvarNgayTao.IsForeignKey        = false;
                colvarNgayTao.IsReadOnly          = false;
                colvarNgayTao.DefaultSetting      = @"";
                colvarNgayTao.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNgayTao);

                TableSchema.TableColumn colvarNguoiTao = new TableSchema.TableColumn(schema);
                colvarNguoiTao.ColumnName          = "NguoiTao";
                colvarNguoiTao.DataType            = DbType.String;
                colvarNguoiTao.MaxLength           = 50;
                colvarNguoiTao.AutoIncrement       = false;
                colvarNguoiTao.IsNullable          = false;
                colvarNguoiTao.IsPrimaryKey        = false;
                colvarNguoiTao.IsForeignKey        = false;
                colvarNguoiTao.IsReadOnly          = false;
                colvarNguoiTao.DefaultSetting      = @"";
                colvarNguoiTao.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNguoiTao);

                TableSchema.TableColumn colvarNgayCapNhat = new TableSchema.TableColumn(schema);
                colvarNgayCapNhat.ColumnName          = "NgayCapNhat";
                colvarNgayCapNhat.DataType            = DbType.DateTime;
                colvarNgayCapNhat.MaxLength           = 0;
                colvarNgayCapNhat.AutoIncrement       = false;
                colvarNgayCapNhat.IsNullable          = true;
                colvarNgayCapNhat.IsPrimaryKey        = false;
                colvarNgayCapNhat.IsForeignKey        = false;
                colvarNgayCapNhat.IsReadOnly          = false;
                colvarNgayCapNhat.DefaultSetting      = @"";
                colvarNgayCapNhat.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNgayCapNhat);

                TableSchema.TableColumn colvarNguoiCapNhat = new TableSchema.TableColumn(schema);
                colvarNguoiCapNhat.ColumnName          = "NguoiCapNhat";
                colvarNguoiCapNhat.DataType            = DbType.String;
                colvarNguoiCapNhat.MaxLength           = 50;
                colvarNguoiCapNhat.AutoIncrement       = false;
                colvarNguoiCapNhat.IsNullable          = true;
                colvarNguoiCapNhat.IsPrimaryKey        = false;
                colvarNguoiCapNhat.IsForeignKey        = false;
                colvarNguoiCapNhat.IsReadOnly          = false;
                colvarNguoiCapNhat.DefaultSetting      = @"";
                colvarNguoiCapNhat.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNguoiCapNhat);

                TableSchema.TableColumn colvarTrangThai = new TableSchema.TableColumn(schema);
                colvarTrangThai.ColumnName          = "TrangThai";
                colvarTrangThai.DataType            = DbType.Boolean;
                colvarTrangThai.MaxLength           = 0;
                colvarTrangThai.AutoIncrement       = false;
                colvarTrangThai.IsNullable          = false;
                colvarTrangThai.IsPrimaryKey        = false;
                colvarTrangThai.IsForeignKey        = false;
                colvarTrangThai.IsReadOnly          = false;
                colvarTrangThai.DefaultSetting      = @"";
                colvarTrangThai.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTrangThai);

                TableSchema.TableColumn colvarIdKhachhang = new TableSchema.TableColumn(schema);
                colvarIdKhachhang.ColumnName          = "IdKhachhang";
                colvarIdKhachhang.DataType            = DbType.Guid;
                colvarIdKhachhang.MaxLength           = 0;
                colvarIdKhachhang.AutoIncrement       = false;
                colvarIdKhachhang.IsNullable          = true;
                colvarIdKhachhang.IsPrimaryKey        = false;
                colvarIdKhachhang.IsForeignKey        = false;
                colvarIdKhachhang.IsReadOnly          = false;
                colvarIdKhachhang.DefaultSetting      = @"";
                colvarIdKhachhang.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdKhachhang);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["ViewWeb"].AddSchema("TblThongBao", schema);
            }
        }
예제 #33
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarMoveID = new TableSchema.TableColumn(this);
            colvarMoveID.ColumnName = "MoveID";
            colvarMoveID.DataType = DbType.Int32;
            colvarMoveID.MaxLength = 0;
            colvarMoveID.AutoIncrement = false;
            colvarMoveID.IsNullable = false;
            colvarMoveID.IsPrimaryKey = false;
            colvarMoveID.IsForeignKey = false;
            colvarMoveID.IsReadOnly = false;

            colvarMoveID.DefaultSetting = @"";
            colvarMoveID.ForeignKeyTableName = "";
            colvarMoveID.ApplyExtendedProperties();
            this.Columns.Add(colvarMoveID);

            TableSchema.TableColumn colvarMoverDate = new TableSchema.TableColumn(this);
            colvarMoverDate.ColumnName = "MoverDate";
            colvarMoverDate.DataType = DbType.DateTime;
            colvarMoverDate.MaxLength = 0;
            colvarMoverDate.AutoIncrement = false;
            colvarMoverDate.IsNullable = true;
            colvarMoverDate.IsPrimaryKey = false;
            colvarMoverDate.IsForeignKey = false;
            colvarMoverDate.IsReadOnly = false;

            colvarMoverDate.DefaultSetting = @"";
            colvarMoverDate.ForeignKeyTableName = "";
            colvarMoverDate.ApplyExtendedProperties();
            this.Columns.Add(colvarMoverDate);

            TableSchema.TableColumn colvarMoverMemberIDOld = new TableSchema.TableColumn(this);
            colvarMoverMemberIDOld.ColumnName = "MoverMemberIDOld";
            colvarMoverMemberIDOld.DataType = DbType.Int32;
            colvarMoverMemberIDOld.MaxLength = 0;
            colvarMoverMemberIDOld.AutoIncrement = false;
            colvarMoverMemberIDOld.IsNullable = true;
            colvarMoverMemberIDOld.IsPrimaryKey = false;
            colvarMoverMemberIDOld.IsForeignKey = false;
            colvarMoverMemberIDOld.IsReadOnly = false;

            colvarMoverMemberIDOld.DefaultSetting = @"";
            colvarMoverMemberIDOld.ForeignKeyTableName = "";
            colvarMoverMemberIDOld.ApplyExtendedProperties();
            this.Columns.Add(colvarMoverMemberIDOld);

            TableSchema.TableColumn colvarMoverMemberIDNew = new TableSchema.TableColumn(this);
            colvarMoverMemberIDNew.ColumnName = "MoverMemberIDNew";
            colvarMoverMemberIDNew.DataType = DbType.Int32;
            colvarMoverMemberIDNew.MaxLength = 0;
            colvarMoverMemberIDNew.AutoIncrement = false;
            colvarMoverMemberIDNew.IsNullable = true;
            colvarMoverMemberIDNew.IsPrimaryKey = false;
            colvarMoverMemberIDNew.IsForeignKey = false;
            colvarMoverMemberIDNew.IsReadOnly = false;

            colvarMoverMemberIDNew.DefaultSetting = @"";
            colvarMoverMemberIDNew.ForeignKeyTableName = "";
            colvarMoverMemberIDNew.ApplyExtendedProperties();
            this.Columns.Add(colvarMoverMemberIDNew);

            TableSchema.TableColumn colvarMoverMemberIDPoint = new TableSchema.TableColumn(this);
            colvarMoverMemberIDPoint.ColumnName = "MoverMemberIDPoint";
            colvarMoverMemberIDPoint.DataType = DbType.Int32;
            colvarMoverMemberIDPoint.MaxLength = 0;
            colvarMoverMemberIDPoint.AutoIncrement = false;
            colvarMoverMemberIDPoint.IsNullable = true;
            colvarMoverMemberIDPoint.IsPrimaryKey = false;
            colvarMoverMemberIDPoint.IsForeignKey = false;
            colvarMoverMemberIDPoint.IsReadOnly = false;

            colvarMoverMemberIDPoint.DefaultSetting = @"";
            colvarMoverMemberIDPoint.ForeignKeyTableName = "";
            colvarMoverMemberIDPoint.ApplyExtendedProperties();
            this.Columns.Add(colvarMoverMemberIDPoint);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);

            TableSchema.TableColumn colvarOldName = new TableSchema.TableColumn(this);
            colvarOldName.ColumnName = "OldName";
            colvarOldName.DataType = DbType.String;
            colvarOldName.MaxLength = 50;
            colvarOldName.AutoIncrement = false;
            colvarOldName.IsNullable = true;
            colvarOldName.IsPrimaryKey = false;
            colvarOldName.IsForeignKey = false;
            colvarOldName.IsReadOnly = false;

            colvarOldName.DefaultSetting = @"";
            colvarOldName.ForeignKeyTableName = "";
            colvarOldName.ApplyExtendedProperties();
            this.Columns.Add(colvarOldName);

            TableSchema.TableColumn colvarNewName = new TableSchema.TableColumn(this);
            colvarNewName.ColumnName = "NewName";
            colvarNewName.DataType = DbType.String;
            colvarNewName.MaxLength = 50;
            colvarNewName.AutoIncrement = false;
            colvarNewName.IsNullable = true;
            colvarNewName.IsPrimaryKey = false;
            colvarNewName.IsForeignKey = false;
            colvarNewName.IsReadOnly = false;

            colvarNewName.DefaultSetting = @"";
            colvarNewName.ForeignKeyTableName = "";
            colvarNewName.ApplyExtendedProperties();
            this.Columns.Add(colvarNewName);

            TableSchema.TableColumn colvarOldPhoneNumber = new TableSchema.TableColumn(this);
            colvarOldPhoneNumber.ColumnName = "OldPhoneNumber";
            colvarOldPhoneNumber.DataType = DbType.String;
            colvarOldPhoneNumber.MaxLength = 50;
            colvarOldPhoneNumber.AutoIncrement = false;
            colvarOldPhoneNumber.IsNullable = false;
            colvarOldPhoneNumber.IsPrimaryKey = false;
            colvarOldPhoneNumber.IsForeignKey = false;
            colvarOldPhoneNumber.IsReadOnly = false;

            colvarOldPhoneNumber.DefaultSetting = @"";
            colvarOldPhoneNumber.ForeignKeyTableName = "";
            colvarOldPhoneNumber.ApplyExtendedProperties();
            this.Columns.Add(colvarOldPhoneNumber);

            TableSchema.TableColumn colvarNewPhoneNumber = new TableSchema.TableColumn(this);
            colvarNewPhoneNumber.ColumnName = "NewPhoneNumber";
            colvarNewPhoneNumber.DataType = DbType.String;
            colvarNewPhoneNumber.MaxLength = 50;
            colvarNewPhoneNumber.AutoIncrement = false;
            colvarNewPhoneNumber.IsNullable = false;
            colvarNewPhoneNumber.IsPrimaryKey = false;
            colvarNewPhoneNumber.IsForeignKey = false;
            colvarNewPhoneNumber.IsReadOnly = false;

            colvarNewPhoneNumber.DefaultSetting = @"";
            colvarNewPhoneNumber.ForeignKeyTableName = "";
            colvarNewPhoneNumber.ApplyExtendedProperties();
            this.Columns.Add(colvarNewPhoneNumber);
        }
예제 #34
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("t_xuatthuoc_theodon", TableType.Table, DataService.GetInstance("ORM"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdPhieu = new TableSchema.TableColumn(schema);
                colvarIdPhieu.ColumnName          = "id_phieu";
                colvarIdPhieu.DataType            = DbType.Int32;
                colvarIdPhieu.MaxLength           = 0;
                colvarIdPhieu.AutoIncrement       = true;
                colvarIdPhieu.IsNullable          = false;
                colvarIdPhieu.IsPrimaryKey        = true;
                colvarIdPhieu.IsForeignKey        = false;
                colvarIdPhieu.IsReadOnly          = false;
                colvarIdPhieu.DefaultSetting      = @"";
                colvarIdPhieu.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdPhieu);

                TableSchema.TableColumn colvarIdPhieuXuat = new TableSchema.TableColumn(schema);
                colvarIdPhieuXuat.ColumnName          = "id_phieu_xuat";
                colvarIdPhieuXuat.DataType            = DbType.Int32;
                colvarIdPhieuXuat.MaxLength           = 0;
                colvarIdPhieuXuat.AutoIncrement       = false;
                colvarIdPhieuXuat.IsNullable          = false;
                colvarIdPhieuXuat.IsPrimaryKey        = false;
                colvarIdPhieuXuat.IsForeignKey        = false;
                colvarIdPhieuXuat.IsReadOnly          = false;
                colvarIdPhieuXuat.DefaultSetting      = @"";
                colvarIdPhieuXuat.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdPhieuXuat);

                TableSchema.TableColumn colvarIdThuoc = new TableSchema.TableColumn(schema);
                colvarIdThuoc.ColumnName          = "id_thuoc";
                colvarIdThuoc.DataType            = DbType.Int32;
                colvarIdThuoc.MaxLength           = 0;
                colvarIdThuoc.AutoIncrement       = false;
                colvarIdThuoc.IsNullable          = false;
                colvarIdThuoc.IsPrimaryKey        = false;
                colvarIdThuoc.IsForeignKey        = false;
                colvarIdThuoc.IsReadOnly          = false;
                colvarIdThuoc.DefaultSetting      = @"";
                colvarIdThuoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdThuoc);

                TableSchema.TableColumn colvarSoLuong = new TableSchema.TableColumn(schema);
                colvarSoLuong.ColumnName          = "so_luong";
                colvarSoLuong.DataType            = DbType.Decimal;
                colvarSoLuong.MaxLength           = 0;
                colvarSoLuong.AutoIncrement       = false;
                colvarSoLuong.IsNullable          = false;
                colvarSoLuong.IsPrimaryKey        = false;
                colvarSoLuong.IsForeignKey        = false;
                colvarSoLuong.IsReadOnly          = false;
                colvarSoLuong.DefaultSetting      = @"";
                colvarSoLuong.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSoLuong);

                TableSchema.TableColumn colvarDonGia = new TableSchema.TableColumn(schema);
                colvarDonGia.ColumnName          = "don_gia";
                colvarDonGia.DataType            = DbType.Decimal;
                colvarDonGia.MaxLength           = 0;
                colvarDonGia.AutoIncrement       = false;
                colvarDonGia.IsNullable          = false;
                colvarDonGia.IsPrimaryKey        = false;
                colvarDonGia.IsForeignKey        = false;
                colvarDonGia.IsReadOnly          = false;
                colvarDonGia.DefaultSetting      = @"";
                colvarDonGia.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDonGia);

                TableSchema.TableColumn colvarPhuThu = new TableSchema.TableColumn(schema);
                colvarPhuThu.ColumnName          = "phu_thu";
                colvarPhuThu.DataType            = DbType.Decimal;
                colvarPhuThu.MaxLength           = 0;
                colvarPhuThu.AutoIncrement       = false;
                colvarPhuThu.IsNullable          = false;
                colvarPhuThu.IsPrimaryKey        = false;
                colvarPhuThu.IsForeignKey        = false;
                colvarPhuThu.IsReadOnly          = false;
                colvarPhuThu.DefaultSetting      = @"";
                colvarPhuThu.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPhuThu);

                TableSchema.TableColumn colvarBnhanChitra = new TableSchema.TableColumn(schema);
                colvarBnhanChitra.ColumnName          = "bnhan_chitra";
                colvarBnhanChitra.DataType            = DbType.Decimal;
                colvarBnhanChitra.MaxLength           = 0;
                colvarBnhanChitra.AutoIncrement       = false;
                colvarBnhanChitra.IsNullable          = false;
                colvarBnhanChitra.IsPrimaryKey        = false;
                colvarBnhanChitra.IsForeignKey        = false;
                colvarBnhanChitra.IsReadOnly          = false;
                colvarBnhanChitra.DefaultSetting      = @"";
                colvarBnhanChitra.ForeignKeyTableName = "";
                schema.Columns.Add(colvarBnhanChitra);

                TableSchema.TableColumn colvarBhytChitra = new TableSchema.TableColumn(schema);
                colvarBhytChitra.ColumnName          = "bhyt_chitra";
                colvarBhytChitra.DataType            = DbType.Decimal;
                colvarBhytChitra.MaxLength           = 0;
                colvarBhytChitra.AutoIncrement       = false;
                colvarBhytChitra.IsNullable          = false;
                colvarBhytChitra.IsPrimaryKey        = false;
                colvarBhytChitra.IsForeignKey        = false;
                colvarBhytChitra.IsReadOnly          = false;
                colvarBhytChitra.DefaultSetting      = @"";
                colvarBhytChitra.ForeignKeyTableName = "";
                schema.Columns.Add(colvarBhytChitra);

                TableSchema.TableColumn colvarPtramBhyt = new TableSchema.TableColumn(schema);
                colvarPtramBhyt.ColumnName          = "ptram_bhyt";
                colvarPtramBhyt.DataType            = DbType.Int32;
                colvarPtramBhyt.MaxLength           = 0;
                colvarPtramBhyt.AutoIncrement       = false;
                colvarPtramBhyt.IsNullable          = true;
                colvarPtramBhyt.IsPrimaryKey        = false;
                colvarPtramBhyt.IsForeignKey        = false;
                colvarPtramBhyt.IsReadOnly          = false;
                colvarPtramBhyt.DefaultSetting      = @"";
                colvarPtramBhyt.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPtramBhyt);

                TableSchema.TableColumn colvarChiDan = new TableSchema.TableColumn(schema);
                colvarChiDan.ColumnName          = "chi_dan";
                colvarChiDan.DataType            = DbType.String;
                colvarChiDan.MaxLength           = 500;
                colvarChiDan.AutoIncrement       = false;
                colvarChiDan.IsNullable          = true;
                colvarChiDan.IsPrimaryKey        = false;
                colvarChiDan.IsForeignKey        = false;
                colvarChiDan.IsReadOnly          = false;
                colvarChiDan.DefaultSetting      = @"";
                colvarChiDan.ForeignKeyTableName = "";
                schema.Columns.Add(colvarChiDan);

                TableSchema.TableColumn colvarCachDung = new TableSchema.TableColumn(schema);
                colvarCachDung.ColumnName          = "cach_dung";
                colvarCachDung.DataType            = DbType.String;
                colvarCachDung.MaxLength           = 255;
                colvarCachDung.AutoIncrement       = false;
                colvarCachDung.IsNullable          = true;
                colvarCachDung.IsPrimaryKey        = false;
                colvarCachDung.IsForeignKey        = false;
                colvarCachDung.IsReadOnly          = false;
                colvarCachDung.DefaultSetting      = @"";
                colvarCachDung.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCachDung);

                TableSchema.TableColumn colvarChidanThem = new TableSchema.TableColumn(schema);
                colvarChidanThem.ColumnName          = "chidan_them";
                colvarChidanThem.DataType            = DbType.String;
                colvarChidanThem.MaxLength           = 500;
                colvarChidanThem.AutoIncrement       = false;
                colvarChidanThem.IsNullable          = true;
                colvarChidanThem.IsPrimaryKey        = false;
                colvarChidanThem.IsForeignKey        = false;
                colvarChidanThem.IsReadOnly          = false;
                colvarChidanThem.DefaultSetting      = @"";
                colvarChidanThem.ForeignKeyTableName = "";
                schema.Columns.Add(colvarChidanThem);

                TableSchema.TableColumn colvarSolanDung = new TableSchema.TableColumn(schema);
                colvarSolanDung.ColumnName          = "solan_dung";
                colvarSolanDung.DataType            = DbType.String;
                colvarSolanDung.MaxLength           = 10;
                colvarSolanDung.AutoIncrement       = false;
                colvarSolanDung.IsNullable          = true;
                colvarSolanDung.IsPrimaryKey        = false;
                colvarSolanDung.IsForeignKey        = false;
                colvarSolanDung.IsReadOnly          = false;
                colvarSolanDung.DefaultSetting      = @"";
                colvarSolanDung.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSolanDung);

                TableSchema.TableColumn colvarSoluongDung = new TableSchema.TableColumn(schema);
                colvarSoluongDung.ColumnName          = "soluong_dung";
                colvarSoluongDung.DataType            = DbType.String;
                colvarSoluongDung.MaxLength           = 10;
                colvarSoluongDung.AutoIncrement       = false;
                colvarSoluongDung.IsNullable          = true;
                colvarSoluongDung.IsPrimaryKey        = false;
                colvarSoluongDung.IsForeignKey        = false;
                colvarSoluongDung.IsReadOnly          = false;
                colvarSoluongDung.DefaultSetting      = @"";
                colvarSoluongDung.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSoluongDung);

                TableSchema.TableColumn colvarNgayTao = new TableSchema.TableColumn(schema);
                colvarNgayTao.ColumnName    = "ngay_tao";
                colvarNgayTao.DataType      = DbType.DateTime;
                colvarNgayTao.MaxLength     = 0;
                colvarNgayTao.AutoIncrement = false;
                colvarNgayTao.IsNullable    = true;
                colvarNgayTao.IsPrimaryKey  = false;
                colvarNgayTao.IsForeignKey  = false;
                colvarNgayTao.IsReadOnly    = false;

                colvarNgayTao.DefaultSetting      = @"(getdate())";
                colvarNgayTao.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNgayTao);

                TableSchema.TableColumn colvarNguoiTao = new TableSchema.TableColumn(schema);
                colvarNguoiTao.ColumnName          = "nguoi_tao";
                colvarNguoiTao.DataType            = DbType.String;
                colvarNguoiTao.MaxLength           = 50;
                colvarNguoiTao.AutoIncrement       = false;
                colvarNguoiTao.IsNullable          = true;
                colvarNguoiTao.IsPrimaryKey        = false;
                colvarNguoiTao.IsForeignKey        = false;
                colvarNguoiTao.IsReadOnly          = false;
                colvarNguoiTao.DefaultSetting      = @"";
                colvarNguoiTao.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNguoiTao);

                TableSchema.TableColumn colvarIdChitietdonthuoc = new TableSchema.TableColumn(schema);
                colvarIdChitietdonthuoc.ColumnName          = "id_chitietdonthuoc";
                colvarIdChitietdonthuoc.DataType            = DbType.Int32;
                colvarIdChitietdonthuoc.MaxLength           = 0;
                colvarIdChitietdonthuoc.AutoIncrement       = false;
                colvarIdChitietdonthuoc.IsNullable          = true;
                colvarIdChitietdonthuoc.IsPrimaryKey        = false;
                colvarIdChitietdonthuoc.IsForeignKey        = false;
                colvarIdChitietdonthuoc.IsReadOnly          = false;
                colvarIdChitietdonthuoc.DefaultSetting      = @"";
                colvarIdChitietdonthuoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdChitietdonthuoc);

                TableSchema.TableColumn colvarIdDonthuoc = new TableSchema.TableColumn(schema);
                colvarIdDonthuoc.ColumnName          = "id_donthuoc";
                colvarIdDonthuoc.DataType            = DbType.Int32;
                colvarIdDonthuoc.MaxLength           = 0;
                colvarIdDonthuoc.AutoIncrement       = false;
                colvarIdDonthuoc.IsNullable          = true;
                colvarIdDonthuoc.IsPrimaryKey        = false;
                colvarIdDonthuoc.IsForeignKey        = false;
                colvarIdDonthuoc.IsReadOnly          = false;
                colvarIdDonthuoc.DefaultSetting      = @"";
                colvarIdDonthuoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdDonthuoc);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["ORM"].AddSchema("t_xuatthuoc_theodon", schema);
            }
        }
예제 #35
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarCompanyCode = new TableSchema.TableColumn(this);
            colvarCompanyCode.ColumnName = "CompanyCode";
            colvarCompanyCode.DataType = DbType.String;
            colvarCompanyCode.MaxLength = 10;
            colvarCompanyCode.AutoIncrement = false;
            colvarCompanyCode.IsNullable = true;
            colvarCompanyCode.IsPrimaryKey = false;
            colvarCompanyCode.IsForeignKey = false;
            colvarCompanyCode.IsReadOnly = false;

            colvarCompanyCode.DefaultSetting = @"";
            colvarCompanyCode.ForeignKeyTableName = "";
            colvarCompanyCode.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyCode);

            TableSchema.TableColumn colvarCompanyName = new TableSchema.TableColumn(this);
            colvarCompanyName.ColumnName = "CompanyName";
            colvarCompanyName.DataType = DbType.String;
            colvarCompanyName.MaxLength = 50;
            colvarCompanyName.AutoIncrement = false;
            colvarCompanyName.IsNullable = false;
            colvarCompanyName.IsPrimaryKey = false;
            colvarCompanyName.IsForeignKey = false;
            colvarCompanyName.IsReadOnly = false;

            colvarCompanyName.DefaultSetting = @"";
            colvarCompanyName.ForeignKeyTableName = "";
            colvarCompanyName.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyName);

            TableSchema.TableColumn colvarCompanyPwd = new TableSchema.TableColumn(this);
            colvarCompanyPwd.ColumnName = "CompanyPwd";
            colvarCompanyPwd.DataType = DbType.String;
            colvarCompanyPwd.MaxLength = 50;
            colvarCompanyPwd.AutoIncrement = false;
            colvarCompanyPwd.IsNullable = false;
            colvarCompanyPwd.IsPrimaryKey = false;
            colvarCompanyPwd.IsForeignKey = false;
            colvarCompanyPwd.IsReadOnly = false;

            colvarCompanyPwd.DefaultSetting = @"";
            colvarCompanyPwd.ForeignKeyTableName = "";
            colvarCompanyPwd.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyPwd);

            TableSchema.TableColumn colvarCompanyEmail = new TableSchema.TableColumn(this);
            colvarCompanyEmail.ColumnName = "CompanyEmail";
            colvarCompanyEmail.DataType = DbType.String;
            colvarCompanyEmail.MaxLength = 50;
            colvarCompanyEmail.AutoIncrement = false;
            colvarCompanyEmail.IsNullable = true;
            colvarCompanyEmail.IsPrimaryKey = false;
            colvarCompanyEmail.IsForeignKey = false;
            colvarCompanyEmail.IsReadOnly = false;

            colvarCompanyEmail.DefaultSetting = @"";
            colvarCompanyEmail.ForeignKeyTableName = "";
            colvarCompanyEmail.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyEmail);

            TableSchema.TableColumn colvarCompanyProvince = new TableSchema.TableColumn(this);
            colvarCompanyProvince.ColumnName = "CompanyProvince";
            colvarCompanyProvince.DataType = DbType.String;
            colvarCompanyProvince.MaxLength = 50;
            colvarCompanyProvince.AutoIncrement = false;
            colvarCompanyProvince.IsNullable = true;
            colvarCompanyProvince.IsPrimaryKey = false;
            colvarCompanyProvince.IsForeignKey = false;
            colvarCompanyProvince.IsReadOnly = false;

            colvarCompanyProvince.DefaultSetting = @"";
            colvarCompanyProvince.ForeignKeyTableName = "";
            colvarCompanyProvince.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyProvince);

            TableSchema.TableColumn colvarCompanyCity = new TableSchema.TableColumn(this);
            colvarCompanyCity.ColumnName = "CompanyCity";
            colvarCompanyCity.DataType = DbType.Int32;
            colvarCompanyCity.MaxLength = 0;
            colvarCompanyCity.AutoIncrement = false;
            colvarCompanyCity.IsNullable = true;
            colvarCompanyCity.IsPrimaryKey = false;
            colvarCompanyCity.IsForeignKey = false;
            colvarCompanyCity.IsReadOnly = false;

            colvarCompanyCity.DefaultSetting = @"";
            colvarCompanyCity.ForeignKeyTableName = "";
            colvarCompanyCity.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyCity);

            TableSchema.TableColumn colvarCompanyArea = new TableSchema.TableColumn(this);
            colvarCompanyArea.ColumnName = "CompanyArea";
            colvarCompanyArea.DataType = DbType.String;
            colvarCompanyArea.MaxLength = 50;
            colvarCompanyArea.AutoIncrement = false;
            colvarCompanyArea.IsNullable = true;
            colvarCompanyArea.IsPrimaryKey = false;
            colvarCompanyArea.IsForeignKey = false;
            colvarCompanyArea.IsReadOnly = false;

            colvarCompanyArea.DefaultSetting = @"";
            colvarCompanyArea.ForeignKeyTableName = "";
            colvarCompanyArea.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyArea);

            TableSchema.TableColumn colvarCompanyLocation = new TableSchema.TableColumn(this);
            colvarCompanyLocation.ColumnName = "CompanyLocation";
            colvarCompanyLocation.DataType = DbType.String;
            colvarCompanyLocation.MaxLength = 50;
            colvarCompanyLocation.AutoIncrement = false;
            colvarCompanyLocation.IsNullable = true;
            colvarCompanyLocation.IsPrimaryKey = false;
            colvarCompanyLocation.IsForeignKey = false;
            colvarCompanyLocation.IsReadOnly = false;

            colvarCompanyLocation.DefaultSetting = @"";
            colvarCompanyLocation.ForeignKeyTableName = "";
            colvarCompanyLocation.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyLocation);

            TableSchema.TableColumn colvarAreaDepth = new TableSchema.TableColumn(this);
            colvarAreaDepth.ColumnName = "AreaDepth";
            colvarAreaDepth.DataType = DbType.String;
            colvarAreaDepth.MaxLength = 50;
            colvarAreaDepth.AutoIncrement = false;
            colvarAreaDepth.IsNullable = true;
            colvarAreaDepth.IsPrimaryKey = false;
            colvarAreaDepth.IsForeignKey = false;
            colvarAreaDepth.IsReadOnly = false;

            colvarAreaDepth.DefaultSetting = @"";
            colvarAreaDepth.ForeignKeyTableName = "";
            colvarAreaDepth.ApplyExtendedProperties();
            this.Columns.Add(colvarAreaDepth);

            TableSchema.TableColumn colvarCompanyAddress = new TableSchema.TableColumn(this);
            colvarCompanyAddress.ColumnName = "CompanyAddress";
            colvarCompanyAddress.DataType = DbType.String;
            colvarCompanyAddress.MaxLength = 250;
            colvarCompanyAddress.AutoIncrement = false;
            colvarCompanyAddress.IsNullable = true;
            colvarCompanyAddress.IsPrimaryKey = false;
            colvarCompanyAddress.IsForeignKey = false;
            colvarCompanyAddress.IsReadOnly = false;

            colvarCompanyAddress.DefaultSetting = @"";
            colvarCompanyAddress.ForeignKeyTableName = "";
            colvarCompanyAddress.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyAddress);

            TableSchema.TableColumn colvarCompanyTel = new TableSchema.TableColumn(this);
            colvarCompanyTel.ColumnName = "CompanyTel";
            colvarCompanyTel.DataType = DbType.String;
            colvarCompanyTel.MaxLength = 50;
            colvarCompanyTel.AutoIncrement = false;
            colvarCompanyTel.IsNullable = true;
            colvarCompanyTel.IsPrimaryKey = false;
            colvarCompanyTel.IsForeignKey = false;
            colvarCompanyTel.IsReadOnly = false;

            colvarCompanyTel.DefaultSetting = @"";
            colvarCompanyTel.ForeignKeyTableName = "";
            colvarCompanyTel.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyTel);

            TableSchema.TableColumn colvarCompanyPhone = new TableSchema.TableColumn(this);
            colvarCompanyPhone.ColumnName = "CompanyPhone";
            colvarCompanyPhone.DataType = DbType.String;
            colvarCompanyPhone.MaxLength = 50;
            colvarCompanyPhone.AutoIncrement = false;
            colvarCompanyPhone.IsNullable = true;
            colvarCompanyPhone.IsPrimaryKey = false;
            colvarCompanyPhone.IsForeignKey = false;
            colvarCompanyPhone.IsReadOnly = false;

            colvarCompanyPhone.DefaultSetting = @"";
            colvarCompanyPhone.ForeignKeyTableName = "";
            colvarCompanyPhone.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyPhone);

            TableSchema.TableColumn colvarCompanyMsn = new TableSchema.TableColumn(this);
            colvarCompanyMsn.ColumnName = "CompanyMsn";
            colvarCompanyMsn.DataType = DbType.String;
            colvarCompanyMsn.MaxLength = 50;
            colvarCompanyMsn.AutoIncrement = false;
            colvarCompanyMsn.IsNullable = true;
            colvarCompanyMsn.IsPrimaryKey = false;
            colvarCompanyMsn.IsForeignKey = false;
            colvarCompanyMsn.IsReadOnly = false;

            colvarCompanyMsn.DefaultSetting = @"";
            colvarCompanyMsn.ForeignKeyTableName = "";
            colvarCompanyMsn.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyMsn);

            TableSchema.TableColumn colvarCompanySkype = new TableSchema.TableColumn(this);
            colvarCompanySkype.ColumnName = "CompanySkype";
            colvarCompanySkype.DataType = DbType.String;
            colvarCompanySkype.MaxLength = 50;
            colvarCompanySkype.AutoIncrement = false;
            colvarCompanySkype.IsNullable = true;
            colvarCompanySkype.IsPrimaryKey = false;
            colvarCompanySkype.IsForeignKey = false;
            colvarCompanySkype.IsReadOnly = false;

            colvarCompanySkype.DefaultSetting = @"";
            colvarCompanySkype.ForeignKeyTableName = "";
            colvarCompanySkype.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanySkype);

            TableSchema.TableColumn colvarCompanyPhoto = new TableSchema.TableColumn(this);
            colvarCompanyPhoto.ColumnName = "CompanyPhoto";
            colvarCompanyPhoto.DataType = DbType.String;
            colvarCompanyPhoto.MaxLength = 50;
            colvarCompanyPhoto.AutoIncrement = false;
            colvarCompanyPhoto.IsNullable = true;
            colvarCompanyPhoto.IsPrimaryKey = false;
            colvarCompanyPhoto.IsForeignKey = false;
            colvarCompanyPhoto.IsReadOnly = false;

            colvarCompanyPhoto.DefaultSetting = @"";
            colvarCompanyPhoto.ForeignKeyTableName = "";
            colvarCompanyPhoto.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyPhoto);

            TableSchema.TableColumn colvarCompanyIntro = new TableSchema.TableColumn(this);
            colvarCompanyIntro.ColumnName = "CompanyIntro";
            colvarCompanyIntro.DataType = DbType.String;
            colvarCompanyIntro.MaxLength = 250;
            colvarCompanyIntro.AutoIncrement = false;
            colvarCompanyIntro.IsNullable = true;
            colvarCompanyIntro.IsPrimaryKey = false;
            colvarCompanyIntro.IsForeignKey = false;
            colvarCompanyIntro.IsReadOnly = false;

            colvarCompanyIntro.DefaultSetting = @"";
            colvarCompanyIntro.ForeignKeyTableName = "";
            colvarCompanyIntro.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyIntro);

            TableSchema.TableColumn colvarCompanyContent = new TableSchema.TableColumn(this);
            colvarCompanyContent.ColumnName = "CompanyContent";
            colvarCompanyContent.DataType = DbType.String;
            colvarCompanyContent.MaxLength = 1073741823;
            colvarCompanyContent.AutoIncrement = false;
            colvarCompanyContent.IsNullable = true;
            colvarCompanyContent.IsPrimaryKey = false;
            colvarCompanyContent.IsForeignKey = false;
            colvarCompanyContent.IsReadOnly = false;

            colvarCompanyContent.DefaultSetting = @"";
            colvarCompanyContent.ForeignKeyTableName = "";
            colvarCompanyContent.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyContent);

            TableSchema.TableColumn colvarIsUseFinger = new TableSchema.TableColumn(this);
            colvarIsUseFinger.ColumnName = "IsUseFinger";
            colvarIsUseFinger.DataType = DbType.Boolean;
            colvarIsUseFinger.MaxLength = 0;
            colvarIsUseFinger.AutoIncrement = false;
            colvarIsUseFinger.IsNullable = true;
            colvarIsUseFinger.IsPrimaryKey = false;
            colvarIsUseFinger.IsForeignKey = false;
            colvarIsUseFinger.IsReadOnly = false;

            colvarIsUseFinger.DefaultSetting = @"((0))";
            colvarIsUseFinger.ForeignKeyTableName = "";
            colvarIsUseFinger.ApplyExtendedProperties();
            this.Columns.Add(colvarIsUseFinger);

            TableSchema.TableColumn colvarCompanyDate = new TableSchema.TableColumn(this);
            colvarCompanyDate.ColumnName = "CompanyDate";
            colvarCompanyDate.DataType = DbType.DateTime;
            colvarCompanyDate.MaxLength = 0;
            colvarCompanyDate.AutoIncrement = false;
            colvarCompanyDate.IsNullable = true;
            colvarCompanyDate.IsPrimaryKey = false;
            colvarCompanyDate.IsForeignKey = false;
            colvarCompanyDate.IsReadOnly = false;

            colvarCompanyDate.DefaultSetting = @"";
            colvarCompanyDate.ForeignKeyTableName = "";
            colvarCompanyDate.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyDate);

            TableSchema.TableColumn colvarCompanyDateView = new TableSchema.TableColumn(this);
            colvarCompanyDateView.ColumnName = "CompanyDateView";
            colvarCompanyDateView.DataType = DbType.DateTime;
            colvarCompanyDateView.MaxLength = 0;
            colvarCompanyDateView.AutoIncrement = false;
            colvarCompanyDateView.IsNullable = true;
            colvarCompanyDateView.IsPrimaryKey = false;
            colvarCompanyDateView.IsForeignKey = false;
            colvarCompanyDateView.IsReadOnly = false;

            colvarCompanyDateView.DefaultSetting = @"";
            colvarCompanyDateView.ForeignKeyTableName = "";
            colvarCompanyDateView.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyDateView);

            TableSchema.TableColumn colvarCompanyStatus = new TableSchema.TableColumn(this);
            colvarCompanyStatus.ColumnName = "CompanyStatus";
            colvarCompanyStatus.DataType = DbType.Int32;
            colvarCompanyStatus.MaxLength = 0;
            colvarCompanyStatus.AutoIncrement = false;
            colvarCompanyStatus.IsNullable = true;
            colvarCompanyStatus.IsPrimaryKey = false;
            colvarCompanyStatus.IsForeignKey = false;
            colvarCompanyStatus.IsReadOnly = false;

            colvarCompanyStatus.DefaultSetting = @"";
            colvarCompanyStatus.ForeignKeyTableName = "";
            colvarCompanyStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyStatus);

            TableSchema.TableColumn colvarCompanyMemo = new TableSchema.TableColumn(this);
            colvarCompanyMemo.ColumnName = "CompanyMemo";
            colvarCompanyMemo.DataType = DbType.String;
            colvarCompanyMemo.MaxLength = 50;
            colvarCompanyMemo.AutoIncrement = false;
            colvarCompanyMemo.IsNullable = true;
            colvarCompanyMemo.IsPrimaryKey = false;
            colvarCompanyMemo.IsForeignKey = false;
            colvarCompanyMemo.IsReadOnly = false;

            colvarCompanyMemo.DefaultSetting = @"";
            colvarCompanyMemo.ForeignKeyTableName = "";
            colvarCompanyMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyMemo);

            TableSchema.TableColumn colvarCompanyRate = new TableSchema.TableColumn(this);
            colvarCompanyRate.ColumnName = "CompanyRate";
            colvarCompanyRate.DataType = DbType.String;
            colvarCompanyRate.MaxLength = 50;
            colvarCompanyRate.AutoIncrement = false;
            colvarCompanyRate.IsNullable = true;
            colvarCompanyRate.IsPrimaryKey = false;
            colvarCompanyRate.IsForeignKey = false;
            colvarCompanyRate.IsReadOnly = false;

            colvarCompanyRate.DefaultSetting = @"";
            colvarCompanyRate.ForeignKeyTableName = "";
            colvarCompanyRate.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyRate);

            TableSchema.TableColumn colvarCompanyRateSale = new TableSchema.TableColumn(this);
            colvarCompanyRateSale.ColumnName = "CompanyRateSale";
            colvarCompanyRateSale.DataType = DbType.String;
            colvarCompanyRateSale.MaxLength = 50;
            colvarCompanyRateSale.AutoIncrement = false;
            colvarCompanyRateSale.IsNullable = true;
            colvarCompanyRateSale.IsPrimaryKey = false;
            colvarCompanyRateSale.IsForeignKey = false;
            colvarCompanyRateSale.IsReadOnly = false;

            colvarCompanyRateSale.DefaultSetting = @"";
            colvarCompanyRateSale.ForeignKeyTableName = "";
            colvarCompanyRateSale.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyRateSale);

            TableSchema.TableColumn colvarCompanyRateMaster = new TableSchema.TableColumn(this);
            colvarCompanyRateMaster.ColumnName = "CompanyRateMaster";
            colvarCompanyRateMaster.DataType = DbType.Decimal;
            colvarCompanyRateMaster.MaxLength = 0;
            colvarCompanyRateMaster.AutoIncrement = false;
            colvarCompanyRateMaster.IsNullable = true;
            colvarCompanyRateMaster.IsPrimaryKey = false;
            colvarCompanyRateMaster.IsForeignKey = false;
            colvarCompanyRateMaster.IsReadOnly = false;

            colvarCompanyRateMaster.ExtendedProperties.Add(new TableSchema.ExtendedProperty("SSX_COLUMN_DISPLAY_NAME","佣金比例"));
            colvarCompanyRateMaster.DefaultSetting = @"";
            colvarCompanyRateMaster.ForeignKeyTableName = "";
            colvarCompanyRateMaster.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyRateMaster);

            TableSchema.TableColumn colvarCompanySaleCount = new TableSchema.TableColumn(this);
            colvarCompanySaleCount.ColumnName = "CompanySaleCount";
            colvarCompanySaleCount.DataType = DbType.Int32;
            colvarCompanySaleCount.MaxLength = 0;
            colvarCompanySaleCount.AutoIncrement = false;
            colvarCompanySaleCount.IsNullable = true;
            colvarCompanySaleCount.IsPrimaryKey = false;
            colvarCompanySaleCount.IsForeignKey = false;
            colvarCompanySaleCount.IsReadOnly = false;

            colvarCompanySaleCount.DefaultSetting = @"";
            colvarCompanySaleCount.ForeignKeyTableName = "";
            colvarCompanySaleCount.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanySaleCount);

            TableSchema.TableColumn colvarCompanySaleSum = new TableSchema.TableColumn(this);
            colvarCompanySaleSum.ColumnName = "CompanySaleSum";
            colvarCompanySaleSum.DataType = DbType.Decimal;
            colvarCompanySaleSum.MaxLength = 0;
            colvarCompanySaleSum.AutoIncrement = false;
            colvarCompanySaleSum.IsNullable = true;
            colvarCompanySaleSum.IsPrimaryKey = false;
            colvarCompanySaleSum.IsForeignKey = false;
            colvarCompanySaleSum.IsReadOnly = false;

            colvarCompanySaleSum.DefaultSetting = @"";
            colvarCompanySaleSum.ForeignKeyTableName = "";
            colvarCompanySaleSum.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanySaleSum);

            TableSchema.TableColumn colvarCompanyBalance = new TableSchema.TableColumn(this);
            colvarCompanyBalance.ColumnName = "CompanyBalance";
            colvarCompanyBalance.DataType = DbType.Decimal;
            colvarCompanyBalance.MaxLength = 0;
            colvarCompanyBalance.AutoIncrement = false;
            colvarCompanyBalance.IsNullable = true;
            colvarCompanyBalance.IsPrimaryKey = false;
            colvarCompanyBalance.IsForeignKey = false;
            colvarCompanyBalance.IsReadOnly = false;

            colvarCompanyBalance.DefaultSetting = @"";
            colvarCompanyBalance.ForeignKeyTableName = "";
            colvarCompanyBalance.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyBalance);

            TableSchema.TableColumn colvarCompanyBalanceCash = new TableSchema.TableColumn(this);
            colvarCompanyBalanceCash.ColumnName = "CompanyBalanceCash";
            colvarCompanyBalanceCash.DataType = DbType.Decimal;
            colvarCompanyBalanceCash.MaxLength = 0;
            colvarCompanyBalanceCash.AutoIncrement = false;
            colvarCompanyBalanceCash.IsNullable = true;
            colvarCompanyBalanceCash.IsPrimaryKey = false;
            colvarCompanyBalanceCash.IsForeignKey = false;
            colvarCompanyBalanceCash.IsReadOnly = false;

            colvarCompanyBalanceCash.DefaultSetting = @"";
            colvarCompanyBalanceCash.ForeignKeyTableName = "";
            colvarCompanyBalanceCash.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyBalanceCash);

            TableSchema.TableColumn colvarCompanyFacebookCount = new TableSchema.TableColumn(this);
            colvarCompanyFacebookCount.ColumnName = "CompanyFacebookCount";
            colvarCompanyFacebookCount.DataType = DbType.Int32;
            colvarCompanyFacebookCount.MaxLength = 0;
            colvarCompanyFacebookCount.AutoIncrement = false;
            colvarCompanyFacebookCount.IsNullable = true;
            colvarCompanyFacebookCount.IsPrimaryKey = false;
            colvarCompanyFacebookCount.IsForeignKey = false;
            colvarCompanyFacebookCount.IsReadOnly = false;

            colvarCompanyFacebookCount.DefaultSetting = @"";
            colvarCompanyFacebookCount.ForeignKeyTableName = "";
            colvarCompanyFacebookCount.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyFacebookCount);

            TableSchema.TableColumn colvarCompanyToken = new TableSchema.TableColumn(this);
            colvarCompanyToken.ColumnName = "CompanyToken";
            colvarCompanyToken.DataType = DbType.AnsiString;
            colvarCompanyToken.MaxLength = 1000;
            colvarCompanyToken.AutoIncrement = false;
            colvarCompanyToken.IsNullable = true;
            colvarCompanyToken.IsPrimaryKey = false;
            colvarCompanyToken.IsForeignKey = false;
            colvarCompanyToken.IsReadOnly = false;

            colvarCompanyToken.DefaultSetting = @"";
            colvarCompanyToken.ForeignKeyTableName = "";
            colvarCompanyToken.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyToken);

            TableSchema.TableColumn colvarCompanyType = new TableSchema.TableColumn(this);
            colvarCompanyType.ColumnName = "CompanyType";
            colvarCompanyType.DataType = DbType.Int32;
            colvarCompanyType.MaxLength = 0;
            colvarCompanyType.AutoIncrement = false;
            colvarCompanyType.IsNullable = true;
            colvarCompanyType.IsPrimaryKey = false;
            colvarCompanyType.IsForeignKey = false;
            colvarCompanyType.IsReadOnly = false;

            colvarCompanyType.DefaultSetting = @"";
            colvarCompanyType.ForeignKeyTableName = "";
            colvarCompanyType.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyType);

            TableSchema.TableColumn colvarCompanyItem = new TableSchema.TableColumn(this);
            colvarCompanyItem.ColumnName = "CompanyItem";
            colvarCompanyItem.DataType = DbType.String;
            colvarCompanyItem.MaxLength = 1000;
            colvarCompanyItem.AutoIncrement = false;
            colvarCompanyItem.IsNullable = true;
            colvarCompanyItem.IsPrimaryKey = false;
            colvarCompanyItem.IsForeignKey = false;
            colvarCompanyItem.IsReadOnly = false;

            colvarCompanyItem.DefaultSetting = @"";
            colvarCompanyItem.ForeignKeyTableName = "";
            colvarCompanyItem.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyItem);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);

            TableSchema.TableColumn colvarCompanyWorkTime = new TableSchema.TableColumn(this);
            colvarCompanyWorkTime.ColumnName = "CompanyWorkTime";
            colvarCompanyWorkTime.DataType = DbType.String;
            colvarCompanyWorkTime.MaxLength = 500;
            colvarCompanyWorkTime.AutoIncrement = false;
            colvarCompanyWorkTime.IsNullable = true;
            colvarCompanyWorkTime.IsPrimaryKey = false;
            colvarCompanyWorkTime.IsForeignKey = false;
            colvarCompanyWorkTime.IsReadOnly = false;

            colvarCompanyWorkTime.DefaultSetting = @"";
            colvarCompanyWorkTime.ForeignKeyTableName = "";
            colvarCompanyWorkTime.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyWorkTime);

            TableSchema.TableColumn colvarCompanyServices = new TableSchema.TableColumn(this);
            colvarCompanyServices.ColumnName = "CompanyServices";
            colvarCompanyServices.DataType = DbType.String;
            colvarCompanyServices.MaxLength = 500;
            colvarCompanyServices.AutoIncrement = false;
            colvarCompanyServices.IsNullable = true;
            colvarCompanyServices.IsPrimaryKey = false;
            colvarCompanyServices.IsForeignKey = false;
            colvarCompanyServices.IsReadOnly = false;

            colvarCompanyServices.DefaultSetting = @"";
            colvarCompanyServices.ForeignKeyTableName = "";
            colvarCompanyServices.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyServices);

            TableSchema.TableColumn colvarMsnPhoneNum = new TableSchema.TableColumn(this);
            colvarMsnPhoneNum.ColumnName = "MsnPhoneNum";
            colvarMsnPhoneNum.DataType = DbType.String;
            colvarMsnPhoneNum.MaxLength = 15;
            colvarMsnPhoneNum.AutoIncrement = false;
            colvarMsnPhoneNum.IsNullable = true;
            colvarMsnPhoneNum.IsPrimaryKey = false;
            colvarMsnPhoneNum.IsForeignKey = false;
            colvarMsnPhoneNum.IsReadOnly = false;

            colvarMsnPhoneNum.DefaultSetting = @"";
            colvarMsnPhoneNum.ForeignKeyTableName = "";
            colvarMsnPhoneNum.ApplyExtendedProperties();
            this.Columns.Add(colvarMsnPhoneNum);

            TableSchema.TableColumn colvarOrderElapsed = new TableSchema.TableColumn(this);
            colvarOrderElapsed.ColumnName = "OrderElapsed";
            colvarOrderElapsed.DataType = DbType.String;
            colvarOrderElapsed.MaxLength = 10;
            colvarOrderElapsed.AutoIncrement = false;
            colvarOrderElapsed.IsNullable = true;
            colvarOrderElapsed.IsPrimaryKey = false;
            colvarOrderElapsed.IsForeignKey = false;
            colvarOrderElapsed.IsReadOnly = false;

            colvarOrderElapsed.DefaultSetting = @"";
            colvarOrderElapsed.ForeignKeyTableName = "";
            colvarOrderElapsed.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderElapsed);

            TableSchema.TableColumn colvarOrderMaxAmount = new TableSchema.TableColumn(this);
            colvarOrderMaxAmount.ColumnName = "OrderMaxAmount";
            colvarOrderMaxAmount.DataType = DbType.Int32;
            colvarOrderMaxAmount.MaxLength = 0;
            colvarOrderMaxAmount.AutoIncrement = false;
            colvarOrderMaxAmount.IsNullable = true;
            colvarOrderMaxAmount.IsPrimaryKey = false;
            colvarOrderMaxAmount.IsForeignKey = false;
            colvarOrderMaxAmount.IsReadOnly = false;

            colvarOrderMaxAmount.DefaultSetting = @"";
            colvarOrderMaxAmount.ForeignKeyTableName = "";
            colvarOrderMaxAmount.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderMaxAmount);

            TableSchema.TableColumn colvarIsUseMsg = new TableSchema.TableColumn(this);
            colvarIsUseMsg.ColumnName = "IsUseMsg";
            colvarIsUseMsg.DataType = DbType.Boolean;
            colvarIsUseMsg.MaxLength = 0;
            colvarIsUseMsg.AutoIncrement = false;
            colvarIsUseMsg.IsNullable = true;
            colvarIsUseMsg.IsPrimaryKey = false;
            colvarIsUseMsg.IsForeignKey = false;
            colvarIsUseMsg.IsReadOnly = false;

            colvarIsUseMsg.DefaultSetting = @"";
            colvarIsUseMsg.ForeignKeyTableName = "";
            colvarIsUseMsg.ApplyExtendedProperties();
            this.Columns.Add(colvarIsUseMsg);

            TableSchema.TableColumn colvarOnSetSum = new TableSchema.TableColumn(this);
            colvarOnSetSum.ColumnName = "OnSetSum";
            colvarOnSetSum.DataType = DbType.Decimal;
            colvarOnSetSum.MaxLength = 0;
            colvarOnSetSum.AutoIncrement = false;
            colvarOnSetSum.IsNullable = true;
            colvarOnSetSum.IsPrimaryKey = false;
            colvarOnSetSum.IsForeignKey = false;
            colvarOnSetSum.IsReadOnly = false;

            colvarOnSetSum.DefaultSetting = @"";
            colvarOnSetSum.ForeignKeyTableName = "";
            colvarOnSetSum.ApplyExtendedProperties();
            this.Columns.Add(colvarOnSetSum);

            TableSchema.TableColumn colvarServiceSum = new TableSchema.TableColumn(this);
            colvarServiceSum.ColumnName = "ServiceSum";
            colvarServiceSum.DataType = DbType.Decimal;
            colvarServiceSum.MaxLength = 0;
            colvarServiceSum.AutoIncrement = false;
            colvarServiceSum.IsNullable = true;
            colvarServiceSum.IsPrimaryKey = false;
            colvarServiceSum.IsForeignKey = false;
            colvarServiceSum.IsReadOnly = false;

            colvarServiceSum.DefaultSetting = @"";
            colvarServiceSum.ForeignKeyTableName = "";
            colvarServiceSum.ApplyExtendedProperties();
            this.Columns.Add(colvarServiceSum);

            TableSchema.TableColumn colvarMenuDate = new TableSchema.TableColumn(this);
            colvarMenuDate.ColumnName = "MenuDate";
            colvarMenuDate.DataType = DbType.DateTime;
            colvarMenuDate.MaxLength = 0;
            colvarMenuDate.AutoIncrement = false;
            colvarMenuDate.IsNullable = true;
            colvarMenuDate.IsPrimaryKey = false;
            colvarMenuDate.IsForeignKey = false;
            colvarMenuDate.IsReadOnly = false;

            colvarMenuDate.DefaultSetting = @"";
            colvarMenuDate.ForeignKeyTableName = "";
            colvarMenuDate.ApplyExtendedProperties();
            this.Columns.Add(colvarMenuDate);

            TableSchema.TableColumn colvarSetTopDate = new TableSchema.TableColumn(this);
            colvarSetTopDate.ColumnName = "SetTopDate";
            colvarSetTopDate.DataType = DbType.DateTime;
            colvarSetTopDate.MaxLength = 0;
            colvarSetTopDate.AutoIncrement = false;
            colvarSetTopDate.IsNullable = true;
            colvarSetTopDate.IsPrimaryKey = false;
            colvarSetTopDate.IsForeignKey = false;
            colvarSetTopDate.IsReadOnly = false;

            colvarSetTopDate.DefaultSetting = @"";
            colvarSetTopDate.ForeignKeyTableName = "";
            colvarSetTopDate.ApplyExtendedProperties();
            this.Columns.Add(colvarSetTopDate);

            TableSchema.TableColumn colvarIsPoint = new TableSchema.TableColumn(this);
            colvarIsPoint.ColumnName = "IsPoint";
            colvarIsPoint.DataType = DbType.Boolean;
            colvarIsPoint.MaxLength = 0;
            colvarIsPoint.AutoIncrement = false;
            colvarIsPoint.IsNullable = true;
            colvarIsPoint.IsPrimaryKey = false;
            colvarIsPoint.IsForeignKey = false;
            colvarIsPoint.IsReadOnly = false;

            colvarIsPoint.DefaultSetting = @"";
            colvarIsPoint.ForeignKeyTableName = "";
            colvarIsPoint.ApplyExtendedProperties();
            this.Columns.Add(colvarIsPoint);

            TableSchema.TableColumn colvarIsOnSale = new TableSchema.TableColumn(this);
            colvarIsOnSale.ColumnName = "IsOnSale";
            colvarIsOnSale.DataType = DbType.Boolean;
            colvarIsOnSale.MaxLength = 0;
            colvarIsOnSale.AutoIncrement = false;
            colvarIsOnSale.IsNullable = true;
            colvarIsOnSale.IsPrimaryKey = false;
            colvarIsOnSale.IsForeignKey = false;
            colvarIsOnSale.IsReadOnly = false;

            colvarIsOnSale.DefaultSetting = @"";
            colvarIsOnSale.ForeignKeyTableName = "";
            colvarIsOnSale.ApplyExtendedProperties();
            this.Columns.Add(colvarIsOnSale);

            TableSchema.TableColumn colvarIsSuspend = new TableSchema.TableColumn(this);
            colvarIsSuspend.ColumnName = "IsSuspend";
            colvarIsSuspend.DataType = DbType.Boolean;
            colvarIsSuspend.MaxLength = 0;
            colvarIsSuspend.AutoIncrement = false;
            colvarIsSuspend.IsNullable = true;
            colvarIsSuspend.IsPrimaryKey = false;
            colvarIsSuspend.IsForeignKey = false;
            colvarIsSuspend.IsReadOnly = false;

            colvarIsSuspend.DefaultSetting = @"";
            colvarIsSuspend.ForeignKeyTableName = "";
            colvarIsSuspend.ApplyExtendedProperties();
            this.Columns.Add(colvarIsSuspend);
        }
예제 #36
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("APR_VisitaDomiciliaria", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdVisitaDomiciliaria = new TableSchema.TableColumn(schema);
                colvarIdVisitaDomiciliaria.ColumnName          = "idVisitaDomiciliaria";
                colvarIdVisitaDomiciliaria.DataType            = DbType.Int32;
                colvarIdVisitaDomiciliaria.MaxLength           = 0;
                colvarIdVisitaDomiciliaria.AutoIncrement       = true;
                colvarIdVisitaDomiciliaria.IsNullable          = false;
                colvarIdVisitaDomiciliaria.IsPrimaryKey        = true;
                colvarIdVisitaDomiciliaria.IsForeignKey        = false;
                colvarIdVisitaDomiciliaria.IsReadOnly          = false;
                colvarIdVisitaDomiciliaria.DefaultSetting      = @"";
                colvarIdVisitaDomiciliaria.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdVisitaDomiciliaria);

                TableSchema.TableColumn colvarIdPaciente = new TableSchema.TableColumn(schema);
                colvarIdPaciente.ColumnName          = "idPaciente";
                colvarIdPaciente.DataType            = DbType.Int32;
                colvarIdPaciente.MaxLength           = 0;
                colvarIdPaciente.AutoIncrement       = false;
                colvarIdPaciente.IsNullable          = false;
                colvarIdPaciente.IsPrimaryKey        = false;
                colvarIdPaciente.IsForeignKey        = false;
                colvarIdPaciente.IsReadOnly          = false;
                colvarIdPaciente.DefaultSetting      = @"";
                colvarIdPaciente.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdPaciente);

                TableSchema.TableColumn colvarIdMotivoVisitaDomiciliaria = new TableSchema.TableColumn(schema);
                colvarIdMotivoVisitaDomiciliaria.ColumnName     = "idMotivoVisitaDomiciliaria";
                colvarIdMotivoVisitaDomiciliaria.DataType       = DbType.Int32;
                colvarIdMotivoVisitaDomiciliaria.MaxLength      = 0;
                colvarIdMotivoVisitaDomiciliaria.AutoIncrement  = false;
                colvarIdMotivoVisitaDomiciliaria.IsNullable     = false;
                colvarIdMotivoVisitaDomiciliaria.IsPrimaryKey   = false;
                colvarIdMotivoVisitaDomiciliaria.IsForeignKey   = true;
                colvarIdMotivoVisitaDomiciliaria.IsReadOnly     = false;
                colvarIdMotivoVisitaDomiciliaria.DefaultSetting = @"";

                colvarIdMotivoVisitaDomiciliaria.ForeignKeyTableName = "APR_MotivoVisitaDomiciliaria";
                schema.Columns.Add(colvarIdMotivoVisitaDomiciliaria);

                TableSchema.TableColumn colvarFecha = new TableSchema.TableColumn(schema);
                colvarFecha.ColumnName          = "Fecha";
                colvarFecha.DataType            = DbType.DateTime;
                colvarFecha.MaxLength           = 0;
                colvarFecha.AutoIncrement       = false;
                colvarFecha.IsNullable          = false;
                colvarFecha.IsPrimaryKey        = false;
                colvarFecha.IsForeignKey        = false;
                colvarFecha.IsReadOnly          = false;
                colvarFecha.DefaultSetting      = @"";
                colvarFecha.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFecha);

                TableSchema.TableColumn colvarOtroMotivo = new TableSchema.TableColumn(schema);
                colvarOtroMotivo.ColumnName          = "OtroMotivo";
                colvarOtroMotivo.DataType            = DbType.AnsiString;
                colvarOtroMotivo.MaxLength           = 50;
                colvarOtroMotivo.AutoIncrement       = false;
                colvarOtroMotivo.IsNullable          = true;
                colvarOtroMotivo.IsPrimaryKey        = false;
                colvarOtroMotivo.IsForeignKey        = false;
                colvarOtroMotivo.IsReadOnly          = false;
                colvarOtroMotivo.DefaultSetting      = @"";
                colvarOtroMotivo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarOtroMotivo);

                TableSchema.TableColumn colvarPersonal = new TableSchema.TableColumn(schema);
                colvarPersonal.ColumnName          = "Personal";
                colvarPersonal.DataType            = DbType.AnsiString;
                colvarPersonal.MaxLength           = 50;
                colvarPersonal.AutoIncrement       = false;
                colvarPersonal.IsNullable          = false;
                colvarPersonal.IsPrimaryKey        = false;
                colvarPersonal.IsForeignKey        = false;
                colvarPersonal.IsReadOnly          = false;
                colvarPersonal.DefaultSetting      = @"";
                colvarPersonal.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPersonal);

                TableSchema.TableColumn colvarObservacion = new TableSchema.TableColumn(schema);
                colvarObservacion.ColumnName          = "Observacion";
                colvarObservacion.DataType            = DbType.AnsiString;
                colvarObservacion.MaxLength           = 2147483647;
                colvarObservacion.AutoIncrement       = false;
                colvarObservacion.IsNullable          = true;
                colvarObservacion.IsPrimaryKey        = false;
                colvarObservacion.IsForeignKey        = false;
                colvarObservacion.IsReadOnly          = false;
                colvarObservacion.DefaultSetting      = @"";
                colvarObservacion.ForeignKeyTableName = "";
                schema.Columns.Add(colvarObservacion);

                TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(schema);
                colvarCreatedBy.ColumnName          = "CreatedBy";
                colvarCreatedBy.DataType            = DbType.AnsiString;
                colvarCreatedBy.MaxLength           = 50;
                colvarCreatedBy.AutoIncrement       = false;
                colvarCreatedBy.IsNullable          = true;
                colvarCreatedBy.IsPrimaryKey        = false;
                colvarCreatedBy.IsForeignKey        = false;
                colvarCreatedBy.IsReadOnly          = false;
                colvarCreatedBy.DefaultSetting      = @"";
                colvarCreatedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedBy);

                TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(schema);
                colvarCreatedOn.ColumnName          = "CreatedOn";
                colvarCreatedOn.DataType            = DbType.DateTime;
                colvarCreatedOn.MaxLength           = 0;
                colvarCreatedOn.AutoIncrement       = false;
                colvarCreatedOn.IsNullable          = true;
                colvarCreatedOn.IsPrimaryKey        = false;
                colvarCreatedOn.IsForeignKey        = false;
                colvarCreatedOn.IsReadOnly          = false;
                colvarCreatedOn.DefaultSetting      = @"";
                colvarCreatedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedOn);

                TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(schema);
                colvarModifiedBy.ColumnName          = "ModifiedBy";
                colvarModifiedBy.DataType            = DbType.AnsiString;
                colvarModifiedBy.MaxLength           = 50;
                colvarModifiedBy.AutoIncrement       = false;
                colvarModifiedBy.IsNullable          = true;
                colvarModifiedBy.IsPrimaryKey        = false;
                colvarModifiedBy.IsForeignKey        = false;
                colvarModifiedBy.IsReadOnly          = false;
                colvarModifiedBy.DefaultSetting      = @"";
                colvarModifiedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedBy);

                TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(schema);
                colvarModifiedOn.ColumnName          = "ModifiedOn";
                colvarModifiedOn.DataType            = DbType.DateTime;
                colvarModifiedOn.MaxLength           = 0;
                colvarModifiedOn.AutoIncrement       = false;
                colvarModifiedOn.IsNullable          = true;
                colvarModifiedOn.IsPrimaryKey        = false;
                colvarModifiedOn.IsForeignKey        = false;
                colvarModifiedOn.IsReadOnly          = false;
                colvarModifiedOn.DefaultSetting      = @"";
                colvarModifiedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedOn);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("APR_VisitaDomiciliaria", schema);
            }
        }
예제 #37
0
 public override void Up() {
     TableSchema.Table tb = this.CreateTable("MyTb");
     TableSchema.TableColumn col = new TableSchema.TableColumn(tb);
     col.ColumnName = "Id";
     col.DataType = System.Data.DbType.AnsiStringFixedLength;
     col.MaxLength = 3;
     col.IsPrimaryKey = true;
     tb.AddColumn(col);
 }
예제 #38
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("tbl_Route", TableType.Table, DataService.GetInstance("SchoolManagementSystem"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarRouteID = new TableSchema.TableColumn(schema);
                colvarRouteID.ColumnName          = "RouteID";
                colvarRouteID.DataType            = DbType.Int32;
                colvarRouteID.MaxLength           = 0;
                colvarRouteID.AutoIncrement       = true;
                colvarRouteID.IsNullable          = false;
                colvarRouteID.IsPrimaryKey        = true;
                colvarRouteID.IsForeignKey        = false;
                colvarRouteID.IsReadOnly          = false;
                colvarRouteID.DefaultSetting      = @"";
                colvarRouteID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarRouteID);

                TableSchema.TableColumn colvarBranchID = new TableSchema.TableColumn(schema);
                colvarBranchID.ColumnName          = "BranchID";
                colvarBranchID.DataType            = DbType.Int32;
                colvarBranchID.MaxLength           = 0;
                colvarBranchID.AutoIncrement       = false;
                colvarBranchID.IsNullable          = false;
                colvarBranchID.IsPrimaryKey        = false;
                colvarBranchID.IsForeignKey        = false;
                colvarBranchID.IsReadOnly          = false;
                colvarBranchID.DefaultSetting      = @"";
                colvarBranchID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarBranchID);

                TableSchema.TableColumn colvarRFrom = new TableSchema.TableColumn(schema);
                colvarRFrom.ColumnName          = "RFrom";
                colvarRFrom.DataType            = DbType.AnsiString;
                colvarRFrom.MaxLength           = -1;
                colvarRFrom.AutoIncrement       = false;
                colvarRFrom.IsNullable          = false;
                colvarRFrom.IsPrimaryKey        = false;
                colvarRFrom.IsForeignKey        = false;
                colvarRFrom.IsReadOnly          = false;
                colvarRFrom.DefaultSetting      = @"";
                colvarRFrom.ForeignKeyTableName = "";
                schema.Columns.Add(colvarRFrom);

                TableSchema.TableColumn colvarRTo = new TableSchema.TableColumn(schema);
                colvarRTo.ColumnName          = "RTo";
                colvarRTo.DataType            = DbType.AnsiString;
                colvarRTo.MaxLength           = -1;
                colvarRTo.AutoIncrement       = false;
                colvarRTo.IsNullable          = false;
                colvarRTo.IsPrimaryKey        = false;
                colvarRTo.IsForeignKey        = false;
                colvarRTo.IsReadOnly          = false;
                colvarRTo.DefaultSetting      = @"";
                colvarRTo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarRTo);

                TableSchema.TableColumn colvarRFare = new TableSchema.TableColumn(schema);
                colvarRFare.ColumnName          = "RFare";
                colvarRFare.DataType            = DbType.Int32;
                colvarRFare.MaxLength           = 0;
                colvarRFare.AutoIncrement       = false;
                colvarRFare.IsNullable          = false;
                colvarRFare.IsPrimaryKey        = false;
                colvarRFare.IsForeignKey        = false;
                colvarRFare.IsReadOnly          = false;
                colvarRFare.DefaultSetting      = @"";
                colvarRFare.ForeignKeyTableName = "";
                schema.Columns.Add(colvarRFare);

                TableSchema.TableColumn colvarIsActive = new TableSchema.TableColumn(schema);
                colvarIsActive.ColumnName          = "IsActive";
                colvarIsActive.DataType            = DbType.Int32;
                colvarIsActive.MaxLength           = 0;
                colvarIsActive.AutoIncrement       = false;
                colvarIsActive.IsNullable          = false;
                colvarIsActive.IsPrimaryKey        = false;
                colvarIsActive.IsForeignKey        = false;
                colvarIsActive.IsReadOnly          = false;
                colvarIsActive.DefaultSetting      = @"";
                colvarIsActive.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIsActive);

                TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(schema);
                colvarCreatedBy.ColumnName          = "CreatedBy";
                colvarCreatedBy.DataType            = DbType.AnsiString;
                colvarCreatedBy.MaxLength           = 50;
                colvarCreatedBy.AutoIncrement       = false;
                colvarCreatedBy.IsNullable          = true;
                colvarCreatedBy.IsPrimaryKey        = false;
                colvarCreatedBy.IsForeignKey        = false;
                colvarCreatedBy.IsReadOnly          = false;
                colvarCreatedBy.DefaultSetting      = @"";
                colvarCreatedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedBy);

                TableSchema.TableColumn colvarUpdatedBy = new TableSchema.TableColumn(schema);
                colvarUpdatedBy.ColumnName          = "UpdatedBy";
                colvarUpdatedBy.DataType            = DbType.AnsiString;
                colvarUpdatedBy.MaxLength           = 50;
                colvarUpdatedBy.AutoIncrement       = false;
                colvarUpdatedBy.IsNullable          = true;
                colvarUpdatedBy.IsPrimaryKey        = false;
                colvarUpdatedBy.IsForeignKey        = false;
                colvarUpdatedBy.IsReadOnly          = false;
                colvarUpdatedBy.DefaultSetting      = @"";
                colvarUpdatedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUpdatedBy);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["SchoolManagementSystem"].AddSchema("tbl_Route", schema);
            }
        }
예제 #39
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarSupportMsgId = new TableSchema.TableColumn(this);
            colvarSupportMsgId.ColumnName = "SupportMsg_ID";
            colvarSupportMsgId.DataType = DbType.Int32;
            colvarSupportMsgId.MaxLength = 0;
            colvarSupportMsgId.AutoIncrement = true;
            colvarSupportMsgId.IsNullable = false;
            colvarSupportMsgId.IsPrimaryKey = true;
            colvarSupportMsgId.IsForeignKey = false;
            colvarSupportMsgId.IsReadOnly = false;

            colvarSupportMsgId.DefaultSetting = @"";
            colvarSupportMsgId.ForeignKeyTableName = "";
            colvarSupportMsgId.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgId);

            TableSchema.TableColumn colvarSupportMsgSid = new TableSchema.TableColumn(this);
            colvarSupportMsgSid.ColumnName = "SupportMsg_SID";
            colvarSupportMsgSid.DataType = DbType.Int32;
            colvarSupportMsgSid.MaxLength = 0;
            colvarSupportMsgSid.AutoIncrement = false;
            colvarSupportMsgSid.IsNullable = false;
            colvarSupportMsgSid.IsPrimaryKey = false;
            colvarSupportMsgSid.IsForeignKey = false;
            colvarSupportMsgSid.IsReadOnly = false;

            colvarSupportMsgSid.DefaultSetting = @"";
            colvarSupportMsgSid.ForeignKeyTableName = "";
            colvarSupportMsgSid.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgSid);

            TableSchema.TableColumn colvarSupportMsgFid = new TableSchema.TableColumn(this);
            colvarSupportMsgFid.ColumnName = "SupportMsg_FID";
            colvarSupportMsgFid.DataType = DbType.Int32;
            colvarSupportMsgFid.MaxLength = 0;
            colvarSupportMsgFid.AutoIncrement = false;
            colvarSupportMsgFid.IsNullable = false;
            colvarSupportMsgFid.IsPrimaryKey = false;
            colvarSupportMsgFid.IsForeignKey = false;
            colvarSupportMsgFid.IsReadOnly = false;

            colvarSupportMsgFid.DefaultSetting = @"";
            colvarSupportMsgFid.ForeignKeyTableName = "";
            colvarSupportMsgFid.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgFid);

            TableSchema.TableColumn colvarSupportMsgTid = new TableSchema.TableColumn(this);
            colvarSupportMsgTid.ColumnName = "SupportMsg_TID";
            colvarSupportMsgTid.DataType = DbType.Int32;
            colvarSupportMsgTid.MaxLength = 0;
            colvarSupportMsgTid.AutoIncrement = false;
            colvarSupportMsgTid.IsNullable = false;
            colvarSupportMsgTid.IsPrimaryKey = false;
            colvarSupportMsgTid.IsForeignKey = false;
            colvarSupportMsgTid.IsReadOnly = false;

            colvarSupportMsgTid.DefaultSetting = @"";
            colvarSupportMsgTid.ForeignKeyTableName = "";
            colvarSupportMsgTid.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgTid);

            TableSchema.TableColumn colvarSupportMsgMemo = new TableSchema.TableColumn(this);
            colvarSupportMsgMemo.ColumnName = "SupportMsg_Memo";
            colvarSupportMsgMemo.DataType = DbType.String;
            colvarSupportMsgMemo.MaxLength = 2000;
            colvarSupportMsgMemo.AutoIncrement = false;
            colvarSupportMsgMemo.IsNullable = false;
            colvarSupportMsgMemo.IsPrimaryKey = false;
            colvarSupportMsgMemo.IsForeignKey = false;
            colvarSupportMsgMemo.IsReadOnly = false;

            colvarSupportMsgMemo.DefaultSetting = @"";
            colvarSupportMsgMemo.ForeignKeyTableName = "";
            colvarSupportMsgMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgMemo);

            TableSchema.TableColumn colvarSupportMsgPhoto = new TableSchema.TableColumn(this);
            colvarSupportMsgPhoto.ColumnName = "SupportMsg_Photo";
            colvarSupportMsgPhoto.DataType = DbType.String;
            colvarSupportMsgPhoto.MaxLength = 50;
            colvarSupportMsgPhoto.AutoIncrement = false;
            colvarSupportMsgPhoto.IsNullable = false;
            colvarSupportMsgPhoto.IsPrimaryKey = false;
            colvarSupportMsgPhoto.IsForeignKey = false;
            colvarSupportMsgPhoto.IsReadOnly = false;

            colvarSupportMsgPhoto.DefaultSetting = @"";
            colvarSupportMsgPhoto.ForeignKeyTableName = "";
            colvarSupportMsgPhoto.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgPhoto);

            TableSchema.TableColumn colvarSupportMsgIsRead = new TableSchema.TableColumn(this);
            colvarSupportMsgIsRead.ColumnName = "SupportMsg_IsRead";
            colvarSupportMsgIsRead.DataType = DbType.Boolean;
            colvarSupportMsgIsRead.MaxLength = 0;
            colvarSupportMsgIsRead.AutoIncrement = false;
            colvarSupportMsgIsRead.IsNullable = false;
            colvarSupportMsgIsRead.IsPrimaryKey = false;
            colvarSupportMsgIsRead.IsForeignKey = false;
            colvarSupportMsgIsRead.IsReadOnly = false;

            colvarSupportMsgIsRead.DefaultSetting = @"";
            colvarSupportMsgIsRead.ForeignKeyTableName = "";
            colvarSupportMsgIsRead.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgIsRead);

            TableSchema.TableColumn colvarSupportMsgIsAsk = new TableSchema.TableColumn(this);
            colvarSupportMsgIsAsk.ColumnName = "SupportMsg_IsAsk";
            colvarSupportMsgIsAsk.DataType = DbType.Boolean;
            colvarSupportMsgIsAsk.MaxLength = 0;
            colvarSupportMsgIsAsk.AutoIncrement = false;
            colvarSupportMsgIsAsk.IsNullable = false;
            colvarSupportMsgIsAsk.IsPrimaryKey = false;
            colvarSupportMsgIsAsk.IsForeignKey = false;
            colvarSupportMsgIsAsk.IsReadOnly = false;

            colvarSupportMsgIsAsk.DefaultSetting = @"";
            colvarSupportMsgIsAsk.ForeignKeyTableName = "";
            colvarSupportMsgIsAsk.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgIsAsk);

            TableSchema.TableColumn colvarSupportMsgDate = new TableSchema.TableColumn(this);
            colvarSupportMsgDate.ColumnName = "SupportMsg_Date";
            colvarSupportMsgDate.DataType = DbType.DateTime;
            colvarSupportMsgDate.MaxLength = 0;
            colvarSupportMsgDate.AutoIncrement = false;
            colvarSupportMsgDate.IsNullable = false;
            colvarSupportMsgDate.IsPrimaryKey = false;
            colvarSupportMsgDate.IsForeignKey = false;
            colvarSupportMsgDate.IsReadOnly = false;

            colvarSupportMsgDate.DefaultSetting = @"";
            colvarSupportMsgDate.ForeignKeyTableName = "";
            colvarSupportMsgDate.ApplyExtendedProperties();
            this.Columns.Add(colvarSupportMsgDate);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #40
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("UsersParagraphLink", TableType.Table, DataService.GetInstance("SSRepository"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "ID";
                colvarId.DataType            = DbType.Int32;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarSourceType = new TableSchema.TableColumn(schema);
                colvarSourceType.ColumnName          = "SourceType";
                colvarSourceType.DataType            = DbType.Int32;
                colvarSourceType.MaxLength           = 0;
                colvarSourceType.AutoIncrement       = false;
                colvarSourceType.IsNullable          = true;
                colvarSourceType.IsPrimaryKey        = false;
                colvarSourceType.IsForeignKey        = false;
                colvarSourceType.IsReadOnly          = false;
                colvarSourceType.DefaultSetting      = @"";
                colvarSourceType.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSourceType);

                TableSchema.TableColumn colvarSourceID = new TableSchema.TableColumn(schema);
                colvarSourceID.ColumnName          = "SourceID";
                colvarSourceID.DataType            = DbType.Int32;
                colvarSourceID.MaxLength           = 0;
                colvarSourceID.AutoIncrement       = false;
                colvarSourceID.IsNullable          = true;
                colvarSourceID.IsPrimaryKey        = false;
                colvarSourceID.IsForeignKey        = false;
                colvarSourceID.IsReadOnly          = false;
                colvarSourceID.DefaultSetting      = @"";
                colvarSourceID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSourceID);

                TableSchema.TableColumn colvarUserID = new TableSchema.TableColumn(schema);
                colvarUserID.ColumnName          = "UserID";
                colvarUserID.DataType            = DbType.AnsiString;
                colvarUserID.MaxLength           = 100;
                colvarUserID.AutoIncrement       = false;
                colvarUserID.IsNullable          = true;
                colvarUserID.IsPrimaryKey        = false;
                colvarUserID.IsForeignKey        = false;
                colvarUserID.IsReadOnly          = false;
                colvarUserID.DefaultSetting      = @"";
                colvarUserID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUserID);

                TableSchema.TableColumn colvarDeleted = new TableSchema.TableColumn(schema);
                colvarDeleted.ColumnName    = "Deleted";
                colvarDeleted.DataType      = DbType.Boolean;
                colvarDeleted.MaxLength     = 0;
                colvarDeleted.AutoIncrement = false;
                colvarDeleted.IsNullable    = false;
                colvarDeleted.IsPrimaryKey  = false;
                colvarDeleted.IsForeignKey  = false;
                colvarDeleted.IsReadOnly    = false;

                colvarDeleted.DefaultSetting      = @"((0))";
                colvarDeleted.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDeleted);

                TableSchema.TableColumn colvarDeletedDate = new TableSchema.TableColumn(schema);
                colvarDeletedDate.ColumnName          = "DeletedDate";
                colvarDeletedDate.DataType            = DbType.DateTime;
                colvarDeletedDate.MaxLength           = 0;
                colvarDeletedDate.AutoIncrement       = false;
                colvarDeletedDate.IsNullable          = true;
                colvarDeletedDate.IsPrimaryKey        = false;
                colvarDeletedDate.IsForeignKey        = false;
                colvarDeletedDate.IsReadOnly          = false;
                colvarDeletedDate.DefaultSetting      = @"";
                colvarDeletedDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDeletedDate);

                TableSchema.TableColumn colvarDateAdded = new TableSchema.TableColumn(schema);
                colvarDateAdded.ColumnName          = "DateAdded";
                colvarDateAdded.DataType            = DbType.DateTime;
                colvarDateAdded.MaxLength           = 0;
                colvarDateAdded.AutoIncrement       = false;
                colvarDateAdded.IsNullable          = true;
                colvarDateAdded.IsPrimaryKey        = false;
                colvarDateAdded.IsForeignKey        = false;
                colvarDateAdded.IsReadOnly          = false;
                colvarDateAdded.DefaultSetting      = @"";
                colvarDateAdded.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDateAdded);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["SSRepository"].AddSchema("UsersParagraphLink", schema);
            }
        }
예제 #41
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarMessageType = new TableSchema.TableColumn(this);
            colvarMessageType.ColumnName = "MessageType";
            colvarMessageType.DataType = DbType.Int32;
            colvarMessageType.MaxLength = 0;
            colvarMessageType.AutoIncrement = false;
            colvarMessageType.IsNullable = false;
            colvarMessageType.IsPrimaryKey = false;
            colvarMessageType.IsForeignKey = false;
            colvarMessageType.IsReadOnly = false;

            colvarMessageType.DefaultSetting = @"";
            colvarMessageType.ForeignKeyTableName = "";
            colvarMessageType.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageType);

            TableSchema.TableColumn colvarMessageSellerID = new TableSchema.TableColumn(this);
            colvarMessageSellerID.ColumnName = "MessageSellerID";
            colvarMessageSellerID.DataType = DbType.Int32;
            colvarMessageSellerID.MaxLength = 0;
            colvarMessageSellerID.AutoIncrement = false;
            colvarMessageSellerID.IsNullable = false;
            colvarMessageSellerID.IsPrimaryKey = false;
            colvarMessageSellerID.IsForeignKey = false;
            colvarMessageSellerID.IsReadOnly = false;

            colvarMessageSellerID.DefaultSetting = @"";
            colvarMessageSellerID.ForeignKeyTableName = "";
            colvarMessageSellerID.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageSellerID);

            TableSchema.TableColumn colvarMessageSubject = new TableSchema.TableColumn(this);
            colvarMessageSubject.ColumnName = "MessageSubject";
            colvarMessageSubject.DataType = DbType.AnsiString;
            colvarMessageSubject.MaxLength = 3000;
            colvarMessageSubject.AutoIncrement = false;
            colvarMessageSubject.IsNullable = false;
            colvarMessageSubject.IsPrimaryKey = false;
            colvarMessageSubject.IsForeignKey = false;
            colvarMessageSubject.IsReadOnly = false;

            colvarMessageSubject.DefaultSetting = @"";
            colvarMessageSubject.ForeignKeyTableName = "";
            colvarMessageSubject.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageSubject);

            TableSchema.TableColumn colvarMessageReply = new TableSchema.TableColumn(this);
            colvarMessageReply.ColumnName = "MessageReply";
            colvarMessageReply.DataType = DbType.AnsiString;
            colvarMessageReply.MaxLength = 3000;
            colvarMessageReply.AutoIncrement = false;
            colvarMessageReply.IsNullable = false;
            colvarMessageReply.IsPrimaryKey = false;
            colvarMessageReply.IsForeignKey = false;
            colvarMessageReply.IsReadOnly = false;

            colvarMessageReply.DefaultSetting = @"";
            colvarMessageReply.ForeignKeyTableName = "";
            colvarMessageReply.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageReply);

            TableSchema.TableColumn colvarMessageSalerID = new TableSchema.TableColumn(this);
            colvarMessageSalerID.ColumnName = "MessageSalerID";
            colvarMessageSalerID.DataType = DbType.Int32;
            colvarMessageSalerID.MaxLength = 0;
            colvarMessageSalerID.AutoIncrement = false;
            colvarMessageSalerID.IsNullable = false;
            colvarMessageSalerID.IsPrimaryKey = false;
            colvarMessageSalerID.IsForeignKey = false;
            colvarMessageSalerID.IsReadOnly = false;

            colvarMessageSalerID.DefaultSetting = @"";
            colvarMessageSalerID.ForeignKeyTableName = "";
            colvarMessageSalerID.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageSalerID);

            TableSchema.TableColumn colvarMessageDateSubject = new TableSchema.TableColumn(this);
            colvarMessageDateSubject.ColumnName = "MessageDateSubject";
            colvarMessageDateSubject.DataType = DbType.DateTime;
            colvarMessageDateSubject.MaxLength = 0;
            colvarMessageDateSubject.AutoIncrement = false;
            colvarMessageDateSubject.IsNullable = false;
            colvarMessageDateSubject.IsPrimaryKey = false;
            colvarMessageDateSubject.IsForeignKey = false;
            colvarMessageDateSubject.IsReadOnly = false;

            colvarMessageDateSubject.DefaultSetting = @"";
            colvarMessageDateSubject.ForeignKeyTableName = "";
            colvarMessageDateSubject.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageDateSubject);

            TableSchema.TableColumn colvarMessageDateReply = new TableSchema.TableColumn(this);
            colvarMessageDateReply.ColumnName = "MessageDateReply";
            colvarMessageDateReply.DataType = DbType.Decimal;
            colvarMessageDateReply.MaxLength = 0;
            colvarMessageDateReply.AutoIncrement = false;
            colvarMessageDateReply.IsNullable = false;
            colvarMessageDateReply.IsPrimaryKey = false;
            colvarMessageDateReply.IsForeignKey = false;
            colvarMessageDateReply.IsReadOnly = false;

            colvarMessageDateReply.DefaultSetting = @"";
            colvarMessageDateReply.ForeignKeyTableName = "";
            colvarMessageDateReply.ApplyExtendedProperties();
            this.Columns.Add(colvarMessageDateReply);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #42
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("BillOfMaterials", TableType.Table, DataService.GetInstance("Default"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"Production";
                //columns

                TableSchema.TableColumn colvarBillOfMaterialsID = new TableSchema.TableColumn(schema);
                colvarBillOfMaterialsID.ColumnName          = "BillOfMaterialsID";
                colvarBillOfMaterialsID.DataType            = DbType.Int32;
                colvarBillOfMaterialsID.MaxLength           = 0;
                colvarBillOfMaterialsID.AutoIncrement       = true;
                colvarBillOfMaterialsID.IsNullable          = false;
                colvarBillOfMaterialsID.IsPrimaryKey        = true;
                colvarBillOfMaterialsID.IsForeignKey        = false;
                colvarBillOfMaterialsID.IsReadOnly          = false;
                colvarBillOfMaterialsID.DefaultSetting      = @"";
                colvarBillOfMaterialsID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarBillOfMaterialsID);

                TableSchema.TableColumn colvarProductAssemblyID = new TableSchema.TableColumn(schema);
                colvarProductAssemblyID.ColumnName     = "ProductAssemblyID";
                colvarProductAssemblyID.DataType       = DbType.Int32;
                colvarProductAssemblyID.MaxLength      = 0;
                colvarProductAssemblyID.AutoIncrement  = false;
                colvarProductAssemblyID.IsNullable     = true;
                colvarProductAssemblyID.IsPrimaryKey   = false;
                colvarProductAssemblyID.IsForeignKey   = true;
                colvarProductAssemblyID.IsReadOnly     = false;
                colvarProductAssemblyID.DefaultSetting = @"";

                colvarProductAssemblyID.ForeignKeyTableName = "Product";
                schema.Columns.Add(colvarProductAssemblyID);

                TableSchema.TableColumn colvarComponentID = new TableSchema.TableColumn(schema);
                colvarComponentID.ColumnName     = "ComponentID";
                colvarComponentID.DataType       = DbType.Int32;
                colvarComponentID.MaxLength      = 0;
                colvarComponentID.AutoIncrement  = false;
                colvarComponentID.IsNullable     = false;
                colvarComponentID.IsPrimaryKey   = false;
                colvarComponentID.IsForeignKey   = true;
                colvarComponentID.IsReadOnly     = false;
                colvarComponentID.DefaultSetting = @"";

                colvarComponentID.ForeignKeyTableName = "Product";
                schema.Columns.Add(colvarComponentID);

                TableSchema.TableColumn colvarStartDate = new TableSchema.TableColumn(schema);
                colvarStartDate.ColumnName    = "StartDate";
                colvarStartDate.DataType      = DbType.DateTime;
                colvarStartDate.MaxLength     = 0;
                colvarStartDate.AutoIncrement = false;
                colvarStartDate.IsNullable    = false;
                colvarStartDate.IsPrimaryKey  = false;
                colvarStartDate.IsForeignKey  = false;
                colvarStartDate.IsReadOnly    = false;

                colvarStartDate.DefaultSetting      = @"(getdate())";
                colvarStartDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarStartDate);

                TableSchema.TableColumn colvarEndDate = new TableSchema.TableColumn(schema);
                colvarEndDate.ColumnName          = "EndDate";
                colvarEndDate.DataType            = DbType.DateTime;
                colvarEndDate.MaxLength           = 0;
                colvarEndDate.AutoIncrement       = false;
                colvarEndDate.IsNullable          = true;
                colvarEndDate.IsPrimaryKey        = false;
                colvarEndDate.IsForeignKey        = false;
                colvarEndDate.IsReadOnly          = false;
                colvarEndDate.DefaultSetting      = @"";
                colvarEndDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEndDate);

                TableSchema.TableColumn colvarUnitMeasureCode = new TableSchema.TableColumn(schema);
                colvarUnitMeasureCode.ColumnName     = "UnitMeasureCode";
                colvarUnitMeasureCode.DataType       = DbType.String;
                colvarUnitMeasureCode.MaxLength      = 3;
                colvarUnitMeasureCode.AutoIncrement  = false;
                colvarUnitMeasureCode.IsNullable     = false;
                colvarUnitMeasureCode.IsPrimaryKey   = false;
                colvarUnitMeasureCode.IsForeignKey   = true;
                colvarUnitMeasureCode.IsReadOnly     = false;
                colvarUnitMeasureCode.DefaultSetting = @"";

                colvarUnitMeasureCode.ForeignKeyTableName = "UnitMeasure";
                schema.Columns.Add(colvarUnitMeasureCode);

                TableSchema.TableColumn colvarBOMLevel = new TableSchema.TableColumn(schema);
                colvarBOMLevel.ColumnName          = "BOMLevel";
                colvarBOMLevel.DataType            = DbType.Int16;
                colvarBOMLevel.MaxLength           = 0;
                colvarBOMLevel.AutoIncrement       = false;
                colvarBOMLevel.IsNullable          = false;
                colvarBOMLevel.IsPrimaryKey        = false;
                colvarBOMLevel.IsForeignKey        = false;
                colvarBOMLevel.IsReadOnly          = false;
                colvarBOMLevel.DefaultSetting      = @"";
                colvarBOMLevel.ForeignKeyTableName = "";
                schema.Columns.Add(colvarBOMLevel);

                TableSchema.TableColumn colvarPerAssemblyQty = new TableSchema.TableColumn(schema);
                colvarPerAssemblyQty.ColumnName    = "PerAssemblyQty";
                colvarPerAssemblyQty.DataType      = DbType.Decimal;
                colvarPerAssemblyQty.MaxLength     = 0;
                colvarPerAssemblyQty.AutoIncrement = false;
                colvarPerAssemblyQty.IsNullable    = false;
                colvarPerAssemblyQty.IsPrimaryKey  = false;
                colvarPerAssemblyQty.IsForeignKey  = false;
                colvarPerAssemblyQty.IsReadOnly    = false;

                colvarPerAssemblyQty.DefaultSetting      = @"((1.00))";
                colvarPerAssemblyQty.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPerAssemblyQty);

                TableSchema.TableColumn colvarModifiedDate = new TableSchema.TableColumn(schema);
                colvarModifiedDate.ColumnName    = "ModifiedDate";
                colvarModifiedDate.DataType      = DbType.DateTime;
                colvarModifiedDate.MaxLength     = 0;
                colvarModifiedDate.AutoIncrement = false;
                colvarModifiedDate.IsNullable    = false;
                colvarModifiedDate.IsPrimaryKey  = false;
                colvarModifiedDate.IsForeignKey  = false;
                colvarModifiedDate.IsReadOnly    = false;

                colvarModifiedDate.DefaultSetting      = @"(getdate())";
                colvarModifiedDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedDate);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["Default"].AddSchema("BillOfMaterials", schema);
            }
        }
예제 #43
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarPaymentRateID = new TableSchema.TableColumn(this);
            colvarPaymentRateID.ColumnName = "PaymentRateID";
            colvarPaymentRateID.DataType = DbType.Int32;
            colvarPaymentRateID.MaxLength = 0;
            colvarPaymentRateID.AutoIncrement = true;
            colvarPaymentRateID.IsNullable = false;
            colvarPaymentRateID.IsPrimaryKey = true;
            colvarPaymentRateID.IsForeignKey = false;
            colvarPaymentRateID.IsReadOnly = false;

            colvarPaymentRateID.DefaultSetting = @"";
            colvarPaymentRateID.ForeignKeyTableName = "";
            colvarPaymentRateID.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateID);

            TableSchema.TableColumn colvarPaymentRateDate = new TableSchema.TableColumn(this);
            colvarPaymentRateDate.ColumnName = "PaymentRateDate";
            colvarPaymentRateDate.DataType = DbType.DateTime;
            colvarPaymentRateDate.MaxLength = 0;
            colvarPaymentRateDate.AutoIncrement = false;
            colvarPaymentRateDate.IsNullable = true;
            colvarPaymentRateDate.IsPrimaryKey = false;
            colvarPaymentRateDate.IsForeignKey = false;
            colvarPaymentRateDate.IsReadOnly = false;

            colvarPaymentRateDate.DefaultSetting = @"";
            colvarPaymentRateDate.ForeignKeyTableName = "";
            colvarPaymentRateDate.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateDate);

            TableSchema.TableColumn colvarPaymentRateCompanyID = new TableSchema.TableColumn(this);
            colvarPaymentRateCompanyID.ColumnName = "PaymentRateCompanyID";
            colvarPaymentRateCompanyID.DataType = DbType.Int32;
            colvarPaymentRateCompanyID.MaxLength = 0;
            colvarPaymentRateCompanyID.AutoIncrement = false;
            colvarPaymentRateCompanyID.IsNullable = true;
            colvarPaymentRateCompanyID.IsPrimaryKey = false;
            colvarPaymentRateCompanyID.IsForeignKey = false;
            colvarPaymentRateCompanyID.IsReadOnly = false;

            colvarPaymentRateCompanyID.DefaultSetting = @"";
            colvarPaymentRateCompanyID.ForeignKeyTableName = "";
            colvarPaymentRateCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateCompanyID);

            TableSchema.TableColumn colvarPaymentRateSale = new TableSchema.TableColumn(this);
            colvarPaymentRateSale.ColumnName = "PaymentRateSale";
            colvarPaymentRateSale.DataType = DbType.Decimal;
            colvarPaymentRateSale.MaxLength = 0;
            colvarPaymentRateSale.AutoIncrement = false;
            colvarPaymentRateSale.IsNullable = true;
            colvarPaymentRateSale.IsPrimaryKey = false;
            colvarPaymentRateSale.IsForeignKey = false;
            colvarPaymentRateSale.IsReadOnly = false;

            colvarPaymentRateSale.DefaultSetting = @"";
            colvarPaymentRateSale.ForeignKeyTableName = "";
            colvarPaymentRateSale.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateSale);

            TableSchema.TableColumn colvarPaymentRateSum = new TableSchema.TableColumn(this);
            colvarPaymentRateSum.ColumnName = "PaymentRateSum";
            colvarPaymentRateSum.DataType = DbType.Decimal;
            colvarPaymentRateSum.MaxLength = 0;
            colvarPaymentRateSum.AutoIncrement = false;
            colvarPaymentRateSum.IsNullable = true;
            colvarPaymentRateSum.IsPrimaryKey = false;
            colvarPaymentRateSum.IsForeignKey = false;
            colvarPaymentRateSum.IsReadOnly = false;

            colvarPaymentRateSum.DefaultSetting = @"";
            colvarPaymentRateSum.ForeignKeyTableName = "";
            colvarPaymentRateSum.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateSum);

            TableSchema.TableColumn colvarPaymentRateMemo = new TableSchema.TableColumn(this);
            colvarPaymentRateMemo.ColumnName = "PaymentRateMemo";
            colvarPaymentRateMemo.DataType = DbType.String;
            colvarPaymentRateMemo.MaxLength = 50;
            colvarPaymentRateMemo.AutoIncrement = false;
            colvarPaymentRateMemo.IsNullable = true;
            colvarPaymentRateMemo.IsPrimaryKey = false;
            colvarPaymentRateMemo.IsForeignKey = false;
            colvarPaymentRateMemo.IsReadOnly = false;

            colvarPaymentRateMemo.DefaultSetting = @"";
            colvarPaymentRateMemo.ForeignKeyTableName = "";
            colvarPaymentRateMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateMemo);

            TableSchema.TableColumn colvarPaymentRateStatus = new TableSchema.TableColumn(this);
            colvarPaymentRateStatus.ColumnName = "PaymentRateStatus";
            colvarPaymentRateStatus.DataType = DbType.Int32;
            colvarPaymentRateStatus.MaxLength = 0;
            colvarPaymentRateStatus.AutoIncrement = false;
            colvarPaymentRateStatus.IsNullable = true;
            colvarPaymentRateStatus.IsPrimaryKey = false;
            colvarPaymentRateStatus.IsForeignKey = false;
            colvarPaymentRateStatus.IsReadOnly = false;

            colvarPaymentRateStatus.DefaultSetting = @"";
            colvarPaymentRateStatus.ForeignKeyTableName = "";
            colvarPaymentRateStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateStatus);

            TableSchema.TableColumn colvarPaymentRateDateStart = new TableSchema.TableColumn(this);
            colvarPaymentRateDateStart.ColumnName = "PaymentRateDateStart";
            colvarPaymentRateDateStart.DataType = DbType.DateTime;
            colvarPaymentRateDateStart.MaxLength = 0;
            colvarPaymentRateDateStart.AutoIncrement = false;
            colvarPaymentRateDateStart.IsNullable = true;
            colvarPaymentRateDateStart.IsPrimaryKey = false;
            colvarPaymentRateDateStart.IsForeignKey = false;
            colvarPaymentRateDateStart.IsReadOnly = false;

            colvarPaymentRateDateStart.DefaultSetting = @"";
            colvarPaymentRateDateStart.ForeignKeyTableName = "";
            colvarPaymentRateDateStart.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateDateStart);

            TableSchema.TableColumn colvarPaymentRateDateEnd = new TableSchema.TableColumn(this);
            colvarPaymentRateDateEnd.ColumnName = "PaymentRateDateEnd";
            colvarPaymentRateDateEnd.DataType = DbType.DateTime;
            colvarPaymentRateDateEnd.MaxLength = 0;
            colvarPaymentRateDateEnd.AutoIncrement = false;
            colvarPaymentRateDateEnd.IsNullable = true;
            colvarPaymentRateDateEnd.IsPrimaryKey = false;
            colvarPaymentRateDateEnd.IsForeignKey = false;
            colvarPaymentRateDateEnd.IsReadOnly = false;

            colvarPaymentRateDateEnd.DefaultSetting = @"";
            colvarPaymentRateDateEnd.ForeignKeyTableName = "";
            colvarPaymentRateDateEnd.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateDateEnd);

            TableSchema.TableColumn colvarPaymentRateCash = new TableSchema.TableColumn(this);
            colvarPaymentRateCash.ColumnName = "PaymentRateCash";
            colvarPaymentRateCash.DataType = DbType.Decimal;
            colvarPaymentRateCash.MaxLength = 0;
            colvarPaymentRateCash.AutoIncrement = false;
            colvarPaymentRateCash.IsNullable = true;
            colvarPaymentRateCash.IsPrimaryKey = false;
            colvarPaymentRateCash.IsForeignKey = false;
            colvarPaymentRateCash.IsReadOnly = false;

            colvarPaymentRateCash.DefaultSetting = @"";
            colvarPaymentRateCash.ForeignKeyTableName = "";
            colvarPaymentRateCash.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateCash);

            TableSchema.TableColumn colvarPaymentRateRate = new TableSchema.TableColumn(this);
            colvarPaymentRateRate.ColumnName = "PaymentRateRate";
            colvarPaymentRateRate.DataType = DbType.Decimal;
            colvarPaymentRateRate.MaxLength = 0;
            colvarPaymentRateRate.AutoIncrement = false;
            colvarPaymentRateRate.IsNullable = true;
            colvarPaymentRateRate.IsPrimaryKey = false;
            colvarPaymentRateRate.IsForeignKey = false;
            colvarPaymentRateRate.IsReadOnly = false;

            colvarPaymentRateRate.DefaultSetting = @"";
            colvarPaymentRateRate.ForeignKeyTableName = "";
            colvarPaymentRateRate.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentRateRate);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #44
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("phpss_usertrack_req", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "id";
                colvarId.DataType            = DbType.Int64;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarSessionfid = new TableSchema.TableColumn(schema);
                colvarSessionfid.ColumnName          = "sessionfid";
                colvarSessionfid.DataType            = DbType.Int32;
                colvarSessionfid.MaxLength           = 0;
                colvarSessionfid.AutoIncrement       = false;
                colvarSessionfid.IsNullable          = false;
                colvarSessionfid.IsPrimaryKey        = false;
                colvarSessionfid.IsForeignKey        = false;
                colvarSessionfid.IsReadOnly          = false;
                colvarSessionfid.DefaultSetting      = @"";
                colvarSessionfid.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSessionfid);

                TableSchema.TableColumn colvarAccountfid = new TableSchema.TableColumn(schema);
                colvarAccountfid.ColumnName          = "accountfid";
                colvarAccountfid.DataType            = DbType.Int16;
                colvarAccountfid.MaxLength           = 0;
                colvarAccountfid.AutoIncrement       = false;
                colvarAccountfid.IsNullable          = false;
                colvarAccountfid.IsPrimaryKey        = false;
                colvarAccountfid.IsForeignKey        = false;
                colvarAccountfid.IsReadOnly          = false;
                colvarAccountfid.DefaultSetting      = @"";
                colvarAccountfid.ForeignKeyTableName = "";
                schema.Columns.Add(colvarAccountfid);

                TableSchema.TableColumn colvarTimestamp = new TableSchema.TableColumn(schema);
                colvarTimestamp.ColumnName          = "timestamp";
                colvarTimestamp.DataType            = DbType.DateTime;
                colvarTimestamp.MaxLength           = 0;
                colvarTimestamp.AutoIncrement       = false;
                colvarTimestamp.IsNullable          = false;
                colvarTimestamp.IsPrimaryKey        = false;
                colvarTimestamp.IsForeignKey        = false;
                colvarTimestamp.IsReadOnly          = false;
                colvarTimestamp.DefaultSetting      = @"";
                colvarTimestamp.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTimestamp);

                TableSchema.TableColumn colvarUsertrackUrlfid = new TableSchema.TableColumn(schema);
                colvarUsertrackUrlfid.ColumnName          = "usertrack_urlfid";
                colvarUsertrackUrlfid.DataType            = DbType.Int32;
                colvarUsertrackUrlfid.MaxLength           = 0;
                colvarUsertrackUrlfid.AutoIncrement       = false;
                colvarUsertrackUrlfid.IsNullable          = false;
                colvarUsertrackUrlfid.IsPrimaryKey        = false;
                colvarUsertrackUrlfid.IsForeignKey        = false;
                colvarUsertrackUrlfid.IsReadOnly          = false;
                colvarUsertrackUrlfid.DefaultSetting      = @"";
                colvarUsertrackUrlfid.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUsertrackUrlfid);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("phpss_usertrack_req", schema);
            }
        }
예제 #45
0
파일: PaymentSchema.cs 프로젝트: eleooo/App
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarPaymentCode = new TableSchema.TableColumn(this);
            colvarPaymentCode.ColumnName = "PaymentCode";
            colvarPaymentCode.DataType = DbType.String;
            colvarPaymentCode.MaxLength = 50;
            colvarPaymentCode.AutoIncrement = false;
            colvarPaymentCode.IsNullable = false;
            colvarPaymentCode.IsPrimaryKey = false;
            colvarPaymentCode.IsForeignKey = false;
            colvarPaymentCode.IsReadOnly = false;

            colvarPaymentCode.DefaultSetting = @"";
            colvarPaymentCode.ForeignKeyTableName = "";
            colvarPaymentCode.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentCode);

            TableSchema.TableColumn colvarPaymentDate = new TableSchema.TableColumn(this);
            colvarPaymentDate.ColumnName = "PaymentDate";
            colvarPaymentDate.DataType = DbType.DateTime;
            colvarPaymentDate.MaxLength = 0;
            colvarPaymentDate.AutoIncrement = false;
            colvarPaymentDate.IsNullable = false;
            colvarPaymentDate.IsPrimaryKey = false;
            colvarPaymentDate.IsForeignKey = false;
            colvarPaymentDate.IsReadOnly = false;

            colvarPaymentDate.DefaultSetting = @"";
            colvarPaymentDate.ForeignKeyTableName = "";
            colvarPaymentDate.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentDate);

            TableSchema.TableColumn colvarPaymentMemberID = new TableSchema.TableColumn(this);
            colvarPaymentMemberID.ColumnName = "PaymentMemberID";
            colvarPaymentMemberID.DataType = DbType.Int32;
            colvarPaymentMemberID.MaxLength = 0;
            colvarPaymentMemberID.AutoIncrement = false;
            colvarPaymentMemberID.IsNullable = true;
            colvarPaymentMemberID.IsPrimaryKey = false;
            colvarPaymentMemberID.IsForeignKey = false;
            colvarPaymentMemberID.IsReadOnly = false;

            colvarPaymentMemberID.DefaultSetting = @"";
            colvarPaymentMemberID.ForeignKeyTableName = "";
            colvarPaymentMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentMemberID);

            TableSchema.TableColumn colvarPaymentCompanyID = new TableSchema.TableColumn(this);
            colvarPaymentCompanyID.ColumnName = "PaymentCompanyID";
            colvarPaymentCompanyID.DataType = DbType.Int32;
            colvarPaymentCompanyID.MaxLength = 0;
            colvarPaymentCompanyID.AutoIncrement = false;
            colvarPaymentCompanyID.IsNullable = true;
            colvarPaymentCompanyID.IsPrimaryKey = false;
            colvarPaymentCompanyID.IsForeignKey = false;
            colvarPaymentCompanyID.IsReadOnly = false;

            colvarPaymentCompanyID.DefaultSetting = @"";
            colvarPaymentCompanyID.ForeignKeyTableName = "";
            colvarPaymentCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentCompanyID);

            TableSchema.TableColumn colvarPaymentEmail = new TableSchema.TableColumn(this);
            colvarPaymentEmail.ColumnName = "PaymentEmail";
            colvarPaymentEmail.DataType = DbType.String;
            colvarPaymentEmail.MaxLength = 50;
            colvarPaymentEmail.AutoIncrement = false;
            colvarPaymentEmail.IsNullable = false;
            colvarPaymentEmail.IsPrimaryKey = false;
            colvarPaymentEmail.IsForeignKey = false;
            colvarPaymentEmail.IsReadOnly = false;

            colvarPaymentEmail.DefaultSetting = @"";
            colvarPaymentEmail.ForeignKeyTableName = "";
            colvarPaymentEmail.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentEmail);

            TableSchema.TableColumn colvarPaymentSum = new TableSchema.TableColumn(this);
            colvarPaymentSum.ColumnName = "PaymentSum";
            colvarPaymentSum.DataType = DbType.Decimal;
            colvarPaymentSum.MaxLength = 0;
            colvarPaymentSum.AutoIncrement = false;
            colvarPaymentSum.IsNullable = false;
            colvarPaymentSum.IsPrimaryKey = false;
            colvarPaymentSum.IsForeignKey = false;
            colvarPaymentSum.IsReadOnly = false;

            colvarPaymentSum.DefaultSetting = @"";
            colvarPaymentSum.ForeignKeyTableName = "";
            colvarPaymentSum.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentSum);

            TableSchema.TableColumn colvarPaymentMemo = new TableSchema.TableColumn(this);
            colvarPaymentMemo.ColumnName = "PaymentMemo";
            colvarPaymentMemo.DataType = DbType.String;
            colvarPaymentMemo.MaxLength = 50;
            colvarPaymentMemo.AutoIncrement = false;
            colvarPaymentMemo.IsNullable = false;
            colvarPaymentMemo.IsPrimaryKey = false;
            colvarPaymentMemo.IsForeignKey = false;
            colvarPaymentMemo.IsReadOnly = false;

            colvarPaymentMemo.DefaultSetting = @"";
            colvarPaymentMemo.ForeignKeyTableName = "";
            colvarPaymentMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentMemo);

            TableSchema.TableColumn colvarPaymentStatus = new TableSchema.TableColumn(this);
            colvarPaymentStatus.ColumnName = "PaymentStatus";
            colvarPaymentStatus.DataType = DbType.Int32;
            colvarPaymentStatus.MaxLength = 0;
            colvarPaymentStatus.AutoIncrement = false;
            colvarPaymentStatus.IsNullable = false;
            colvarPaymentStatus.IsPrimaryKey = false;
            colvarPaymentStatus.IsForeignKey = false;
            colvarPaymentStatus.IsReadOnly = false;

            colvarPaymentStatus.DefaultSetting = @"";
            colvarPaymentStatus.ForeignKeyTableName = "";
            colvarPaymentStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentStatus);

            TableSchema.TableColumn colvarPaymentType = new TableSchema.TableColumn(this);
            colvarPaymentType.ColumnName = "PaymentType";
            colvarPaymentType.DataType = DbType.Int32;
            colvarPaymentType.MaxLength = 0;
            colvarPaymentType.AutoIncrement = false;
            colvarPaymentType.IsNullable = true;
            colvarPaymentType.IsPrimaryKey = false;
            colvarPaymentType.IsForeignKey = false;
            colvarPaymentType.IsReadOnly = false;

            colvarPaymentType.DefaultSetting = @"";
            colvarPaymentType.ForeignKeyTableName = "";
            colvarPaymentType.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentType);

            TableSchema.TableColumn colvarPaymentOrderID = new TableSchema.TableColumn(this);
            colvarPaymentOrderID.ColumnName = "PaymentOrderID";
            colvarPaymentOrderID.DataType = DbType.Int32;
            colvarPaymentOrderID.MaxLength = 0;
            colvarPaymentOrderID.AutoIncrement = false;
            colvarPaymentOrderID.IsNullable = true;
            colvarPaymentOrderID.IsPrimaryKey = false;
            colvarPaymentOrderID.IsForeignKey = false;
            colvarPaymentOrderID.IsReadOnly = false;

            colvarPaymentOrderID.DefaultSetting = @"";
            colvarPaymentOrderID.ForeignKeyTableName = "";
            colvarPaymentOrderID.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentOrderID);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #46
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarRewardID = new TableSchema.TableColumn(this);
            colvarRewardID.ColumnName = "RewardID";
            colvarRewardID.DataType = DbType.Int32;
            colvarRewardID.MaxLength = 0;
            colvarRewardID.AutoIncrement = true;
            colvarRewardID.IsNullable = false;
            colvarRewardID.IsPrimaryKey = true;
            colvarRewardID.IsForeignKey = false;
            colvarRewardID.IsReadOnly = false;

            colvarRewardID.DefaultSetting = @"";
            colvarRewardID.ForeignKeyTableName = "";
            colvarRewardID.ApplyExtendedProperties();
            this.Columns.Add(colvarRewardID);

            TableSchema.TableColumn colvarRewardDate = new TableSchema.TableColumn(this);
            colvarRewardDate.ColumnName = "RewardDate";
            colvarRewardDate.DataType = DbType.DateTime;
            colvarRewardDate.MaxLength = 0;
            colvarRewardDate.AutoIncrement = false;
            colvarRewardDate.IsNullable = true;
            colvarRewardDate.IsPrimaryKey = false;
            colvarRewardDate.IsForeignKey = false;
            colvarRewardDate.IsReadOnly = false;

            colvarRewardDate.DefaultSetting = @"";
            colvarRewardDate.ForeignKeyTableName = "";
            colvarRewardDate.ApplyExtendedProperties();
            this.Columns.Add(colvarRewardDate);

            TableSchema.TableColumn colvarRewardEndDate = new TableSchema.TableColumn(this);
            colvarRewardEndDate.ColumnName = "RewardEndDate";
            colvarRewardEndDate.DataType = DbType.DateTime;
            colvarRewardEndDate.MaxLength = 0;
            colvarRewardEndDate.AutoIncrement = false;
            colvarRewardEndDate.IsNullable = true;
            colvarRewardEndDate.IsPrimaryKey = false;
            colvarRewardEndDate.IsForeignKey = false;
            colvarRewardEndDate.IsReadOnly = false;

            colvarRewardEndDate.DefaultSetting = @"";
            colvarRewardEndDate.ForeignKeyTableName = "";
            colvarRewardEndDate.ApplyExtendedProperties();
            this.Columns.Add(colvarRewardEndDate);

            TableSchema.TableColumn colvarRewardRate = new TableSchema.TableColumn(this);
            colvarRewardRate.ColumnName = "RewardRate";
            colvarRewardRate.DataType = DbType.Decimal;
            colvarRewardRate.MaxLength = 0;
            colvarRewardRate.AutoIncrement = false;
            colvarRewardRate.IsNullable = true;
            colvarRewardRate.IsPrimaryKey = false;
            colvarRewardRate.IsForeignKey = false;
            colvarRewardRate.IsReadOnly = false;

            colvarRewardRate.DefaultSetting = @"";
            colvarRewardRate.ForeignKeyTableName = "";
            colvarRewardRate.ApplyExtendedProperties();
            this.Columns.Add(colvarRewardRate);

            TableSchema.TableColumn colvarRewardFlag = new TableSchema.TableColumn(this);
            colvarRewardFlag.ColumnName = "RewardFlag";
            colvarRewardFlag.DataType = DbType.Int32;
            colvarRewardFlag.MaxLength = 0;
            colvarRewardFlag.AutoIncrement = false;
            colvarRewardFlag.IsNullable = true;
            colvarRewardFlag.IsPrimaryKey = false;
            colvarRewardFlag.IsForeignKey = false;
            colvarRewardFlag.IsReadOnly = false;

            colvarRewardFlag.DefaultSetting = @"";
            colvarRewardFlag.ForeignKeyTableName = "";
            colvarRewardFlag.ApplyExtendedProperties();
            this.Columns.Add(colvarRewardFlag);

            TableSchema.TableColumn colvarRewardMemo = new TableSchema.TableColumn(this);
            colvarRewardMemo.ColumnName = "RewardMemo";
            colvarRewardMemo.DataType = DbType.AnsiString;
            colvarRewardMemo.MaxLength = 2147483647;
            colvarRewardMemo.AutoIncrement = false;
            colvarRewardMemo.IsNullable = true;
            colvarRewardMemo.IsPrimaryKey = false;
            colvarRewardMemo.IsForeignKey = false;
            colvarRewardMemo.IsReadOnly = false;

            colvarRewardMemo.DefaultSetting = @"";
            colvarRewardMemo.ForeignKeyTableName = "";
            colvarRewardMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarRewardMemo);
        }
예제 #47
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("PN_nino", TableType.Table, DataService.GetInstance("sicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdNino = new TableSchema.TableColumn(schema);
                colvarIdNino.ColumnName          = "id_nino";
                colvarIdNino.DataType            = DbType.Int32;
                colvarIdNino.MaxLength           = 0;
                colvarIdNino.AutoIncrement       = true;
                colvarIdNino.IsNullable          = false;
                colvarIdNino.IsPrimaryKey        = true;
                colvarIdNino.IsForeignKey        = false;
                colvarIdNino.IsReadOnly          = false;
                colvarIdNino.DefaultSetting      = @"";
                colvarIdNino.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdNino);

                TableSchema.TableColumn colvarCuie = new TableSchema.TableColumn(schema);
                colvarCuie.ColumnName          = "cuie";
                colvarCuie.DataType            = DbType.AnsiString;
                colvarCuie.MaxLength           = 10;
                colvarCuie.AutoIncrement       = false;
                colvarCuie.IsNullable          = false;
                colvarCuie.IsPrimaryKey        = false;
                colvarCuie.IsForeignKey        = false;
                colvarCuie.IsReadOnly          = false;
                colvarCuie.DefaultSetting      = @"";
                colvarCuie.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCuie);

                TableSchema.TableColumn colvarClave = new TableSchema.TableColumn(schema);
                colvarClave.ColumnName          = "clave";
                colvarClave.DataType            = DbType.AnsiString;
                colvarClave.MaxLength           = 50;
                colvarClave.AutoIncrement       = false;
                colvarClave.IsNullable          = true;
                colvarClave.IsPrimaryKey        = false;
                colvarClave.IsForeignKey        = false;
                colvarClave.IsReadOnly          = false;
                colvarClave.DefaultSetting      = @"";
                colvarClave.ForeignKeyTableName = "";
                schema.Columns.Add(colvarClave);

                TableSchema.TableColumn colvarClaseDoc = new TableSchema.TableColumn(schema);
                colvarClaseDoc.ColumnName          = "clase_doc";
                colvarClaseDoc.DataType            = DbType.AnsiString;
                colvarClaseDoc.MaxLength           = -1;
                colvarClaseDoc.AutoIncrement       = false;
                colvarClaseDoc.IsNullable          = true;
                colvarClaseDoc.IsPrimaryKey        = false;
                colvarClaseDoc.IsForeignKey        = false;
                colvarClaseDoc.IsReadOnly          = false;
                colvarClaseDoc.DefaultSetting      = @"";
                colvarClaseDoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarClaseDoc);

                TableSchema.TableColumn colvarTipoDoc = new TableSchema.TableColumn(schema);
                colvarTipoDoc.ColumnName          = "tipo_doc";
                colvarTipoDoc.DataType            = DbType.AnsiString;
                colvarTipoDoc.MaxLength           = -1;
                colvarTipoDoc.AutoIncrement       = false;
                colvarTipoDoc.IsNullable          = true;
                colvarTipoDoc.IsPrimaryKey        = false;
                colvarTipoDoc.IsForeignKey        = false;
                colvarTipoDoc.IsReadOnly          = false;
                colvarTipoDoc.DefaultSetting      = @"";
                colvarTipoDoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTipoDoc);

                TableSchema.TableColumn colvarNumDoc = new TableSchema.TableColumn(schema);
                colvarNumDoc.ColumnName          = "num_doc";
                colvarNumDoc.DataType            = DbType.Decimal;
                colvarNumDoc.MaxLength           = 0;
                colvarNumDoc.AutoIncrement       = false;
                colvarNumDoc.IsNullable          = true;
                colvarNumDoc.IsPrimaryKey        = false;
                colvarNumDoc.IsForeignKey        = false;
                colvarNumDoc.IsReadOnly          = false;
                colvarNumDoc.DefaultSetting      = @"";
                colvarNumDoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNumDoc);

                TableSchema.TableColumn colvarApellido = new TableSchema.TableColumn(schema);
                colvarApellido.ColumnName          = "apellido";
                colvarApellido.DataType            = DbType.AnsiString;
                colvarApellido.MaxLength           = -1;
                colvarApellido.AutoIncrement       = false;
                colvarApellido.IsNullable          = true;
                colvarApellido.IsPrimaryKey        = false;
                colvarApellido.IsForeignKey        = false;
                colvarApellido.IsReadOnly          = false;
                colvarApellido.DefaultSetting      = @"";
                colvarApellido.ForeignKeyTableName = "";
                schema.Columns.Add(colvarApellido);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName          = "nombre";
                colvarNombre.DataType            = DbType.AnsiString;
                colvarNombre.MaxLength           = -1;
                colvarNombre.AutoIncrement       = false;
                colvarNombre.IsNullable          = true;
                colvarNombre.IsPrimaryKey        = false;
                colvarNombre.IsForeignKey        = false;
                colvarNombre.IsReadOnly          = false;
                colvarNombre.DefaultSetting      = @"";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarFechaNac = new TableSchema.TableColumn(schema);
                colvarFechaNac.ColumnName          = "fecha_nac";
                colvarFechaNac.DataType            = DbType.DateTime;
                colvarFechaNac.MaxLength           = 0;
                colvarFechaNac.AutoIncrement       = false;
                colvarFechaNac.IsNullable          = true;
                colvarFechaNac.IsPrimaryKey        = false;
                colvarFechaNac.IsForeignKey        = false;
                colvarFechaNac.IsReadOnly          = false;
                colvarFechaNac.DefaultSetting      = @"";
                colvarFechaNac.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaNac);

                TableSchema.TableColumn colvarFechaControl = new TableSchema.TableColumn(schema);
                colvarFechaControl.ColumnName          = "fecha_control";
                colvarFechaControl.DataType            = DbType.DateTime;
                colvarFechaControl.MaxLength           = 0;
                colvarFechaControl.AutoIncrement       = false;
                colvarFechaControl.IsNullable          = true;
                colvarFechaControl.IsPrimaryKey        = false;
                colvarFechaControl.IsForeignKey        = false;
                colvarFechaControl.IsReadOnly          = false;
                colvarFechaControl.DefaultSetting      = @"";
                colvarFechaControl.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaControl);

                TableSchema.TableColumn colvarPeso = new TableSchema.TableColumn(schema);
                colvarPeso.ColumnName          = "peso";
                colvarPeso.DataType            = DbType.Decimal;
                colvarPeso.MaxLength           = 0;
                colvarPeso.AutoIncrement       = false;
                colvarPeso.IsNullable          = true;
                colvarPeso.IsPrimaryKey        = false;
                colvarPeso.IsForeignKey        = false;
                colvarPeso.IsReadOnly          = false;
                colvarPeso.DefaultSetting      = @"";
                colvarPeso.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPeso);

                TableSchema.TableColumn colvarTalla = new TableSchema.TableColumn(schema);
                colvarTalla.ColumnName          = "talla";
                colvarTalla.DataType            = DbType.Decimal;
                colvarTalla.MaxLength           = 0;
                colvarTalla.AutoIncrement       = false;
                colvarTalla.IsNullable          = true;
                colvarTalla.IsPrimaryKey        = false;
                colvarTalla.IsForeignKey        = false;
                colvarTalla.IsReadOnly          = false;
                colvarTalla.DefaultSetting      = @"";
                colvarTalla.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTalla);

                TableSchema.TableColumn colvarPerimCefalico = new TableSchema.TableColumn(schema);
                colvarPerimCefalico.ColumnName          = "perim_cefalico";
                colvarPerimCefalico.DataType            = DbType.Decimal;
                colvarPerimCefalico.MaxLength           = 0;
                colvarPerimCefalico.AutoIncrement       = false;
                colvarPerimCefalico.IsNullable          = true;
                colvarPerimCefalico.IsPrimaryKey        = false;
                colvarPerimCefalico.IsForeignKey        = false;
                colvarPerimCefalico.IsReadOnly          = false;
                colvarPerimCefalico.DefaultSetting      = @"";
                colvarPerimCefalico.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPerimCefalico);

                TableSchema.TableColumn colvarPercenPesoEdad = new TableSchema.TableColumn(schema);
                colvarPercenPesoEdad.ColumnName          = "percen_peso_edad";
                colvarPercenPesoEdad.DataType            = DbType.AnsiString;
                colvarPercenPesoEdad.MaxLength           = -1;
                colvarPercenPesoEdad.AutoIncrement       = false;
                colvarPercenPesoEdad.IsNullable          = true;
                colvarPercenPesoEdad.IsPrimaryKey        = false;
                colvarPercenPesoEdad.IsForeignKey        = false;
                colvarPercenPesoEdad.IsReadOnly          = false;
                colvarPercenPesoEdad.DefaultSetting      = @"";
                colvarPercenPesoEdad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPercenPesoEdad);

                TableSchema.TableColumn colvarPercenTallaEdad = new TableSchema.TableColumn(schema);
                colvarPercenTallaEdad.ColumnName          = "percen_talla_edad";
                colvarPercenTallaEdad.DataType            = DbType.AnsiString;
                colvarPercenTallaEdad.MaxLength           = -1;
                colvarPercenTallaEdad.AutoIncrement       = false;
                colvarPercenTallaEdad.IsNullable          = true;
                colvarPercenTallaEdad.IsPrimaryKey        = false;
                colvarPercenTallaEdad.IsForeignKey        = false;
                colvarPercenTallaEdad.IsReadOnly          = false;
                colvarPercenTallaEdad.DefaultSetting      = @"";
                colvarPercenTallaEdad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPercenTallaEdad);

                TableSchema.TableColumn colvarPercenPerimCefaliEdad = new TableSchema.TableColumn(schema);
                colvarPercenPerimCefaliEdad.ColumnName          = "percen_perim_cefali_edad";
                colvarPercenPerimCefaliEdad.DataType            = DbType.AnsiString;
                colvarPercenPerimCefaliEdad.MaxLength           = -1;
                colvarPercenPerimCefaliEdad.AutoIncrement       = false;
                colvarPercenPerimCefaliEdad.IsNullable          = true;
                colvarPercenPerimCefaliEdad.IsPrimaryKey        = false;
                colvarPercenPerimCefaliEdad.IsForeignKey        = false;
                colvarPercenPerimCefaliEdad.IsReadOnly          = false;
                colvarPercenPerimCefaliEdad.DefaultSetting      = @"";
                colvarPercenPerimCefaliEdad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPercenPerimCefaliEdad);

                TableSchema.TableColumn colvarPercenPesoTalla = new TableSchema.TableColumn(schema);
                colvarPercenPesoTalla.ColumnName          = "percen_peso_talla";
                colvarPercenPesoTalla.DataType            = DbType.AnsiString;
                colvarPercenPesoTalla.MaxLength           = -1;
                colvarPercenPesoTalla.AutoIncrement       = false;
                colvarPercenPesoTalla.IsNullable          = true;
                colvarPercenPesoTalla.IsPrimaryKey        = false;
                colvarPercenPesoTalla.IsForeignKey        = false;
                colvarPercenPesoTalla.IsReadOnly          = false;
                colvarPercenPesoTalla.DefaultSetting      = @"";
                colvarPercenPesoTalla.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPercenPesoTalla);

                TableSchema.TableColumn colvarTripleViral = new TableSchema.TableColumn(schema);
                colvarTripleViral.ColumnName          = "triple_viral";
                colvarTripleViral.DataType            = DbType.DateTime;
                colvarTripleViral.MaxLength           = 0;
                colvarTripleViral.AutoIncrement       = false;
                colvarTripleViral.IsNullable          = true;
                colvarTripleViral.IsPrimaryKey        = false;
                colvarTripleViral.IsForeignKey        = false;
                colvarTripleViral.IsReadOnly          = false;
                colvarTripleViral.DefaultSetting      = @"";
                colvarTripleViral.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTripleViral);

                TableSchema.TableColumn colvarNinoEdad = new TableSchema.TableColumn(schema);
                colvarNinoEdad.ColumnName          = "nino_edad";
                colvarNinoEdad.DataType            = DbType.Int32;
                colvarNinoEdad.MaxLength           = 0;
                colvarNinoEdad.AutoIncrement       = false;
                colvarNinoEdad.IsNullable          = true;
                colvarNinoEdad.IsPrimaryKey        = false;
                colvarNinoEdad.IsForeignKey        = false;
                colvarNinoEdad.IsReadOnly          = false;
                colvarNinoEdad.DefaultSetting      = @"";
                colvarNinoEdad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNinoEdad);

                TableSchema.TableColumn colvarObservaciones = new TableSchema.TableColumn(schema);
                colvarObservaciones.ColumnName          = "observaciones";
                colvarObservaciones.DataType            = DbType.AnsiString;
                colvarObservaciones.MaxLength           = -1;
                colvarObservaciones.AutoIncrement       = false;
                colvarObservaciones.IsNullable          = true;
                colvarObservaciones.IsPrimaryKey        = false;
                colvarObservaciones.IsForeignKey        = false;
                colvarObservaciones.IsReadOnly          = false;
                colvarObservaciones.DefaultSetting      = @"";
                colvarObservaciones.ForeignKeyTableName = "";
                schema.Columns.Add(colvarObservaciones);

                TableSchema.TableColumn colvarFechaCarga = new TableSchema.TableColumn(schema);
                colvarFechaCarga.ColumnName          = "fecha_carga";
                colvarFechaCarga.DataType            = DbType.DateTime;
                colvarFechaCarga.MaxLength           = 0;
                colvarFechaCarga.AutoIncrement       = false;
                colvarFechaCarga.IsNullable          = true;
                colvarFechaCarga.IsPrimaryKey        = false;
                colvarFechaCarga.IsForeignKey        = false;
                colvarFechaCarga.IsReadOnly          = false;
                colvarFechaCarga.DefaultSetting      = @"";
                colvarFechaCarga.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaCarga);

                TableSchema.TableColumn colvarUsuario = new TableSchema.TableColumn(schema);
                colvarUsuario.ColumnName          = "usuario";
                colvarUsuario.DataType            = DbType.AnsiString;
                colvarUsuario.MaxLength           = -1;
                colvarUsuario.AutoIncrement       = false;
                colvarUsuario.IsNullable          = true;
                colvarUsuario.IsPrimaryKey        = false;
                colvarUsuario.IsForeignKey        = false;
                colvarUsuario.IsReadOnly          = false;
                colvarUsuario.DefaultSetting      = @"";
                colvarUsuario.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUsuario);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["sicProvider"].AddSchema("PN_nino", schema);
            }
        }
예제 #48
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("RIS_Entidad", TableType.Table, DataService.GetInstance("sicProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdEntidad = new TableSchema.TableColumn(schema);
                colvarIdEntidad.ColumnName          = "idEntidad";
                colvarIdEntidad.DataType            = DbType.Int32;
                colvarIdEntidad.MaxLength           = 0;
                colvarIdEntidad.AutoIncrement       = true;
                colvarIdEntidad.IsNullable          = false;
                colvarIdEntidad.IsPrimaryKey        = true;
                colvarIdEntidad.IsForeignKey        = false;
                colvarIdEntidad.IsReadOnly          = false;
                colvarIdEntidad.DefaultSetting      = @"";
                colvarIdEntidad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdEntidad);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName          = "nombre";
                colvarNombre.DataType            = DbType.AnsiString;
                colvarNombre.MaxLength           = 100;
                colvarNombre.AutoIncrement       = false;
                colvarNombre.IsNullable          = false;
                colvarNombre.IsPrimaryKey        = false;
                colvarNombre.IsForeignKey        = false;
                colvarNombre.IsReadOnly          = false;
                colvarNombre.DefaultSetting      = @"";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarCaracter = new TableSchema.TableColumn(schema);
                colvarCaracter.ColumnName          = "caracter";
                colvarCaracter.DataType            = DbType.AnsiString;
                colvarCaracter.MaxLength           = 100;
                colvarCaracter.AutoIncrement       = false;
                colvarCaracter.IsNullable          = true;
                colvarCaracter.IsPrimaryKey        = false;
                colvarCaracter.IsForeignKey        = false;
                colvarCaracter.IsReadOnly          = false;
                colvarCaracter.DefaultSetting      = @"";
                colvarCaracter.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCaracter);

                TableSchema.TableColumn colvarDomicilio = new TableSchema.TableColumn(schema);
                colvarDomicilio.ColumnName          = "domicilio";
                colvarDomicilio.DataType            = DbType.AnsiString;
                colvarDomicilio.MaxLength           = 100;
                colvarDomicilio.AutoIncrement       = false;
                colvarDomicilio.IsNullable          = true;
                colvarDomicilio.IsPrimaryKey        = false;
                colvarDomicilio.IsForeignKey        = false;
                colvarDomicilio.IsReadOnly          = false;
                colvarDomicilio.DefaultSetting      = @"";
                colvarDomicilio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDomicilio);

                TableSchema.TableColumn colvarEmail = new TableSchema.TableColumn(schema);
                colvarEmail.ColumnName          = "email";
                colvarEmail.DataType            = DbType.AnsiString;
                colvarEmail.MaxLength           = 100;
                colvarEmail.AutoIncrement       = false;
                colvarEmail.IsNullable          = true;
                colvarEmail.IsPrimaryKey        = false;
                colvarEmail.IsForeignKey        = false;
                colvarEmail.IsReadOnly          = false;
                colvarEmail.DefaultSetting      = @"";
                colvarEmail.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEmail);

                TableSchema.TableColumn colvarTipo = new TableSchema.TableColumn(schema);
                colvarTipo.ColumnName          = "tipo";
                colvarTipo.DataType            = DbType.AnsiString;
                colvarTipo.MaxLength           = 100;
                colvarTipo.AutoIncrement       = false;
                colvarTipo.IsNullable          = true;
                colvarTipo.IsPrimaryKey        = false;
                colvarTipo.IsForeignKey        = false;
                colvarTipo.IsReadOnly          = false;
                colvarTipo.DefaultSetting      = @"";
                colvarTipo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTipo);

                TableSchema.TableColumn colvarTipoEntidad = new TableSchema.TableColumn(schema);
                colvarTipoEntidad.ColumnName          = "tipoEntidad";
                colvarTipoEntidad.DataType            = DbType.AnsiString;
                colvarTipoEntidad.MaxLength           = 100;
                colvarTipoEntidad.AutoIncrement       = false;
                colvarTipoEntidad.IsNullable          = true;
                colvarTipoEntidad.IsPrimaryKey        = false;
                colvarTipoEntidad.IsForeignKey        = false;
                colvarTipoEntidad.IsReadOnly          = false;
                colvarTipoEntidad.DefaultSetting      = @"";
                colvarTipoEntidad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTipoEntidad);

                TableSchema.TableColumn colvarCaracteristicas = new TableSchema.TableColumn(schema);
                colvarCaracteristicas.ColumnName          = "caracteristicas";
                colvarCaracteristicas.DataType            = DbType.AnsiString;
                colvarCaracteristicas.MaxLength           = 100;
                colvarCaracteristicas.AutoIncrement       = false;
                colvarCaracteristicas.IsNullable          = true;
                colvarCaracteristicas.IsPrimaryKey        = false;
                colvarCaracteristicas.IsForeignKey        = false;
                colvarCaracteristicas.IsReadOnly          = false;
                colvarCaracteristicas.DefaultSetting      = @"";
                colvarCaracteristicas.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCaracteristicas);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["sicProvider"].AddSchema("RIS_Entidad", schema);
            }
        }
예제 #49
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = false;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = false;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarFaceBookDate = new TableSchema.TableColumn(this);
            colvarFaceBookDate.ColumnName = "FaceBookDate";
            colvarFaceBookDate.DataType = DbType.DateTime;
            colvarFaceBookDate.MaxLength = 0;
            colvarFaceBookDate.AutoIncrement = false;
            colvarFaceBookDate.IsNullable = true;
            colvarFaceBookDate.IsPrimaryKey = false;
            colvarFaceBookDate.IsForeignKey = false;
            colvarFaceBookDate.IsReadOnly = false;

            colvarFaceBookDate.DefaultSetting = @"";
            colvarFaceBookDate.ForeignKeyTableName = "";
            colvarFaceBookDate.ApplyExtendedProperties();
            this.Columns.Add(colvarFaceBookDate);

            TableSchema.TableColumn colvarFaceBookMemo = new TableSchema.TableColumn(this);
            colvarFaceBookMemo.ColumnName = "FaceBookMemo";
            colvarFaceBookMemo.DataType = DbType.String;
            colvarFaceBookMemo.MaxLength = 300;
            colvarFaceBookMemo.AutoIncrement = false;
            colvarFaceBookMemo.IsNullable = true;
            colvarFaceBookMemo.IsPrimaryKey = false;
            colvarFaceBookMemo.IsForeignKey = false;
            colvarFaceBookMemo.IsReadOnly = false;

            colvarFaceBookMemo.DefaultSetting = @"";
            colvarFaceBookMemo.ForeignKeyTableName = "";
            colvarFaceBookMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarFaceBookMemo);

            TableSchema.TableColumn colvarFaceBookBizID = new TableSchema.TableColumn(this);
            colvarFaceBookBizID.ColumnName = "FaceBookBizID";
            colvarFaceBookBizID.DataType = DbType.Int32;
            colvarFaceBookBizID.MaxLength = 0;
            colvarFaceBookBizID.AutoIncrement = false;
            colvarFaceBookBizID.IsNullable = true;
            colvarFaceBookBizID.IsPrimaryKey = false;
            colvarFaceBookBizID.IsForeignKey = false;
            colvarFaceBookBizID.IsReadOnly = false;

            colvarFaceBookBizID.DefaultSetting = @"";
            colvarFaceBookBizID.ForeignKeyTableName = "";
            colvarFaceBookBizID.ApplyExtendedProperties();
            this.Columns.Add(colvarFaceBookBizID);

            TableSchema.TableColumn colvarFaceBookMemberID = new TableSchema.TableColumn(this);
            colvarFaceBookMemberID.ColumnName = "FaceBookMemberID";
            colvarFaceBookMemberID.DataType = DbType.Int32;
            colvarFaceBookMemberID.MaxLength = 0;
            colvarFaceBookMemberID.AutoIncrement = false;
            colvarFaceBookMemberID.IsNullable = true;
            colvarFaceBookMemberID.IsPrimaryKey = false;
            colvarFaceBookMemberID.IsForeignKey = false;
            colvarFaceBookMemberID.IsReadOnly = false;

            colvarFaceBookMemberID.DefaultSetting = @"";
            colvarFaceBookMemberID.ForeignKeyTableName = "";
            colvarFaceBookMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarFaceBookMemberID);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);

            TableSchema.TableColumn colvarFaceBookBizType = new TableSchema.TableColumn(this);
            colvarFaceBookBizType.ColumnName = "FaceBookBizType";
            colvarFaceBookBizType.DataType = DbType.Int32;
            colvarFaceBookBizType.MaxLength = 0;
            colvarFaceBookBizType.AutoIncrement = false;
            colvarFaceBookBizType.IsNullable = true;
            colvarFaceBookBizType.IsPrimaryKey = false;
            colvarFaceBookBizType.IsForeignKey = false;
            colvarFaceBookBizType.IsReadOnly = false;

            colvarFaceBookBizType.DefaultSetting = @"";
            colvarFaceBookBizType.ForeignKeyTableName = "";
            colvarFaceBookBizType.ApplyExtendedProperties();
            this.Columns.Add(colvarFaceBookBizType);

            TableSchema.TableColumn colvarReplyMemberID = new TableSchema.TableColumn(this);
            colvarReplyMemberID.ColumnName = "ReplyMemberID";
            colvarReplyMemberID.DataType = DbType.Int32;
            colvarReplyMemberID.MaxLength = 0;
            colvarReplyMemberID.AutoIncrement = false;
            colvarReplyMemberID.IsNullable = true;
            colvarReplyMemberID.IsPrimaryKey = false;
            colvarReplyMemberID.IsForeignKey = false;
            colvarReplyMemberID.IsReadOnly = false;

            colvarReplyMemberID.DefaultSetting = @"";
            colvarReplyMemberID.ForeignKeyTableName = "";
            colvarReplyMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarReplyMemberID);

            TableSchema.TableColumn colvarReplyMemo = new TableSchema.TableColumn(this);
            colvarReplyMemo.ColumnName = "ReplyMemo";
            colvarReplyMemo.DataType = DbType.String;
            colvarReplyMemo.MaxLength = 300;
            colvarReplyMemo.AutoIncrement = false;
            colvarReplyMemo.IsNullable = true;
            colvarReplyMemo.IsPrimaryKey = false;
            colvarReplyMemo.IsForeignKey = false;
            colvarReplyMemo.IsReadOnly = false;

            colvarReplyMemo.DefaultSetting = @"";
            colvarReplyMemo.ForeignKeyTableName = "";
            colvarReplyMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarReplyMemo);

            TableSchema.TableColumn colvarReplyDate = new TableSchema.TableColumn(this);
            colvarReplyDate.ColumnName = "ReplyDate";
            colvarReplyDate.DataType = DbType.DateTime;
            colvarReplyDate.MaxLength = 0;
            colvarReplyDate.AutoIncrement = false;
            colvarReplyDate.IsNullable = true;
            colvarReplyDate.IsPrimaryKey = false;
            colvarReplyDate.IsForeignKey = false;
            colvarReplyDate.IsReadOnly = false;

            colvarReplyDate.DefaultSetting = @"";
            colvarReplyDate.ForeignKeyTableName = "";
            colvarReplyDate.ApplyExtendedProperties();
            this.Columns.Add(colvarReplyDate);

            TableSchema.TableColumn colvarFaceBookRate = new TableSchema.TableColumn(this);
            colvarFaceBookRate.ColumnName = "FaceBookRate";
            colvarFaceBookRate.DataType = DbType.Int32;
            colvarFaceBookRate.MaxLength = 0;
            colvarFaceBookRate.AutoIncrement = false;
            colvarFaceBookRate.IsNullable = true;
            colvarFaceBookRate.IsPrimaryKey = false;
            colvarFaceBookRate.IsForeignKey = false;
            colvarFaceBookRate.IsReadOnly = false;

            colvarFaceBookRate.DefaultSetting = @"";
            colvarFaceBookRate.ForeignKeyTableName = "";
            colvarFaceBookRate.ApplyExtendedProperties();
            this.Columns.Add(colvarFaceBookRate);

            TableSchema.TableColumn colvarLatestOrderDate = new TableSchema.TableColumn(this);
            colvarLatestOrderDate.ColumnName = "LatestOrderDate";
            colvarLatestOrderDate.DataType = DbType.DateTime;
            colvarLatestOrderDate.MaxLength = 0;
            colvarLatestOrderDate.AutoIncrement = false;
            colvarLatestOrderDate.IsNullable = true;
            colvarLatestOrderDate.IsPrimaryKey = false;
            colvarLatestOrderDate.IsForeignKey = false;
            colvarLatestOrderDate.IsReadOnly = false;

            colvarLatestOrderDate.DefaultSetting = @"";
            colvarLatestOrderDate.ForeignKeyTableName = "";
            colvarLatestOrderDate.ApplyExtendedProperties();
            this.Columns.Add(colvarLatestOrderDate);

            TableSchema.TableColumn colvarPBizID = new TableSchema.TableColumn(this);
            colvarPBizID.ColumnName = "PBizID";
            colvarPBizID.DataType = DbType.Int32;
            colvarPBizID.MaxLength = 0;
            colvarPBizID.AutoIncrement = false;
            colvarPBizID.IsNullable = true;
            colvarPBizID.IsPrimaryKey = false;
            colvarPBizID.IsForeignKey = false;
            colvarPBizID.IsReadOnly = false;

            colvarPBizID.DefaultSetting = @"";
            colvarPBizID.ForeignKeyTableName = "";
            colvarPBizID.ApplyExtendedProperties();
            this.Columns.Add(colvarPBizID);

            TableSchema.TableColumn colvarIsRead = new TableSchema.TableColumn(this);
            colvarIsRead.ColumnName = "IsRead";
            colvarIsRead.DataType = DbType.Boolean;
            colvarIsRead.MaxLength = 0;
            colvarIsRead.AutoIncrement = false;
            colvarIsRead.IsNullable = true;
            colvarIsRead.IsPrimaryKey = false;
            colvarIsRead.IsForeignKey = false;
            colvarIsRead.IsReadOnly = false;

            colvarIsRead.DefaultSetting = @"";
            colvarIsRead.ForeignKeyTableName = "";
            colvarIsRead.ApplyExtendedProperties();
            this.Columns.Add(colvarIsRead);

            TableSchema.TableColumn colvarTopDate = new TableSchema.TableColumn(this);
            colvarTopDate.ColumnName = "TopDate";
            colvarTopDate.DataType = DbType.DateTime;
            colvarTopDate.MaxLength = 0;
            colvarTopDate.AutoIncrement = false;
            colvarTopDate.IsNullable = true;
            colvarTopDate.IsPrimaryKey = false;
            colvarTopDate.IsForeignKey = false;
            colvarTopDate.IsReadOnly = false;

            colvarTopDate.DefaultSetting = @"";
            colvarTopDate.ForeignKeyTableName = "";
            colvarTopDate.ApplyExtendedProperties();
            this.Columns.Add(colvarTopDate);

            TableSchema.TableColumn colvarPFaceBookMemberID = new TableSchema.TableColumn(this);
            colvarPFaceBookMemberID.ColumnName = "PFaceBookMemberID";
            colvarPFaceBookMemberID.DataType = DbType.Int32;
            colvarPFaceBookMemberID.MaxLength = 0;
            colvarPFaceBookMemberID.AutoIncrement = false;
            colvarPFaceBookMemberID.IsNullable = true;
            colvarPFaceBookMemberID.IsPrimaryKey = false;
            colvarPFaceBookMemberID.IsForeignKey = false;
            colvarPFaceBookMemberID.IsReadOnly = false;

            colvarPFaceBookMemberID.DefaultSetting = @"";
            colvarPFaceBookMemberID.ForeignKeyTableName = "";
            colvarPFaceBookMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarPFaceBookMemberID);
        }
예제 #50
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("dashCommerce_Store_ShippingEstimate", TableType.Table, DataService.GetInstance("dashCommerceProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarShippingEstimateId = new TableSchema.TableColumn(schema);
                colvarShippingEstimateId.ColumnName          = "ShippingEstimateId";
                colvarShippingEstimateId.DataType            = DbType.Int32;
                colvarShippingEstimateId.MaxLength           = 0;
                colvarShippingEstimateId.AutoIncrement       = true;
                colvarShippingEstimateId.IsNullable          = false;
                colvarShippingEstimateId.IsPrimaryKey        = true;
                colvarShippingEstimateId.IsForeignKey        = false;
                colvarShippingEstimateId.IsReadOnly          = false;
                colvarShippingEstimateId.DefaultSetting      = @"";
                colvarShippingEstimateId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarShippingEstimateId);

                TableSchema.TableColumn colvarName = new TableSchema.TableColumn(schema);
                colvarName.ColumnName          = "Name";
                colvarName.DataType            = DbType.String;
                colvarName.MaxLength           = 150;
                colvarName.AutoIncrement       = false;
                colvarName.IsNullable          = false;
                colvarName.IsPrimaryKey        = false;
                colvarName.IsForeignKey        = false;
                colvarName.IsReadOnly          = false;
                colvarName.DefaultSetting      = @"";
                colvarName.ForeignKeyTableName = "";
                schema.Columns.Add(colvarName);

                TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(schema);
                colvarCreatedBy.ColumnName          = "CreatedBy";
                colvarCreatedBy.DataType            = DbType.String;
                colvarCreatedBy.MaxLength           = 50;
                colvarCreatedBy.AutoIncrement       = false;
                colvarCreatedBy.IsNullable          = true;
                colvarCreatedBy.IsPrimaryKey        = false;
                colvarCreatedBy.IsForeignKey        = false;
                colvarCreatedBy.IsReadOnly          = false;
                colvarCreatedBy.DefaultSetting      = @"";
                colvarCreatedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedBy);

                TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(schema);
                colvarCreatedOn.ColumnName    = "CreatedOn";
                colvarCreatedOn.DataType      = DbType.DateTime;
                colvarCreatedOn.MaxLength     = 0;
                colvarCreatedOn.AutoIncrement = false;
                colvarCreatedOn.IsNullable    = false;
                colvarCreatedOn.IsPrimaryKey  = false;
                colvarCreatedOn.IsForeignKey  = false;
                colvarCreatedOn.IsReadOnly    = false;

                colvarCreatedOn.DefaultSetting      = @"(getutcdate())";
                colvarCreatedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCreatedOn);

                TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(schema);
                colvarModifiedBy.ColumnName          = "ModifiedBy";
                colvarModifiedBy.DataType            = DbType.String;
                colvarModifiedBy.MaxLength           = 50;
                colvarModifiedBy.AutoIncrement       = false;
                colvarModifiedBy.IsNullable          = true;
                colvarModifiedBy.IsPrimaryKey        = false;
                colvarModifiedBy.IsForeignKey        = false;
                colvarModifiedBy.IsReadOnly          = false;
                colvarModifiedBy.DefaultSetting      = @"";
                colvarModifiedBy.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedBy);

                TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(schema);
                colvarModifiedOn.ColumnName    = "ModifiedOn";
                colvarModifiedOn.DataType      = DbType.DateTime;
                colvarModifiedOn.MaxLength     = 0;
                colvarModifiedOn.AutoIncrement = false;
                colvarModifiedOn.IsNullable    = false;
                colvarModifiedOn.IsPrimaryKey  = false;
                colvarModifiedOn.IsForeignKey  = false;
                colvarModifiedOn.IsReadOnly    = false;

                colvarModifiedOn.DefaultSetting      = @"(getutcdate())";
                colvarModifiedOn.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedOn);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["dashCommerceProvider"].AddSchema("dashCommerce_Store_ShippingEstimate", schema);
            }
        }
예제 #51
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarDateX = new TableSchema.TableColumn(this);
            colvarDateX.ColumnName = "Date";
            colvarDateX.DataType = DbType.DateTime;
            colvarDateX.MaxLength = 0;
            colvarDateX.AutoIncrement = false;
            colvarDateX.IsNullable = true;
            colvarDateX.IsPrimaryKey = false;
            colvarDateX.IsForeignKey = false;
            colvarDateX.IsReadOnly = false;

            colvarDateX.DefaultSetting = @"";
            colvarDateX.ForeignKeyTableName = "";
            colvarDateX.ApplyExtendedProperties();
            this.Columns.Add(colvarDateX);

            TableSchema.TableColumn colvarDesc = new TableSchema.TableColumn(this);
            colvarDesc.ColumnName = "Desc";
            colvarDesc.DataType = DbType.String;
            colvarDesc.MaxLength = 2000;
            colvarDesc.AutoIncrement = false;
            colvarDesc.IsNullable = true;
            colvarDesc.IsPrimaryKey = false;
            colvarDesc.IsForeignKey = false;
            colvarDesc.IsReadOnly = false;

            colvarDesc.DefaultSetting = @"";
            colvarDesc.ForeignKeyTableName = "";
            colvarDesc.ApplyExtendedProperties();
            this.Columns.Add(colvarDesc);

            TableSchema.TableColumn colvarIsCurrent = new TableSchema.TableColumn(this);
            colvarIsCurrent.ColumnName = "IsCurrent";
            colvarIsCurrent.DataType = DbType.Int32;
            colvarIsCurrent.MaxLength = 0;
            colvarIsCurrent.AutoIncrement = false;
            colvarIsCurrent.IsNullable = true;
            colvarIsCurrent.IsPrimaryKey = false;
            colvarIsCurrent.IsForeignKey = false;
            colvarIsCurrent.IsReadOnly = false;

            colvarIsCurrent.DefaultSetting = @"";
            colvarIsCurrent.ForeignKeyTableName = "";
            colvarIsCurrent.ApplyExtendedProperties();
            this.Columns.Add(colvarIsCurrent);

            TableSchema.TableColumn colvarOrderId = new TableSchema.TableColumn(this);
            colvarOrderId.ColumnName = "OrderId";
            colvarOrderId.DataType = DbType.Int32;
            colvarOrderId.MaxLength = 0;
            colvarOrderId.AutoIncrement = false;
            colvarOrderId.IsNullable = true;
            colvarOrderId.IsPrimaryKey = false;
            colvarOrderId.IsForeignKey = false;
            colvarOrderId.IsReadOnly = false;

            colvarOrderId.DefaultSetting = @"";
            colvarOrderId.ForeignKeyTableName = "";
            colvarOrderId.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderId);

            TableSchema.TableColumn colvarVoice = new TableSchema.TableColumn(this);
            colvarVoice.ColumnName = "Voice";
            colvarVoice.DataType = DbType.String;
            colvarVoice.MaxLength = 500;
            colvarVoice.AutoIncrement = false;
            colvarVoice.IsNullable = true;
            colvarVoice.IsPrimaryKey = false;
            colvarVoice.IsForeignKey = false;
            colvarVoice.IsReadOnly = false;

            colvarVoice.DefaultSetting = @"";
            colvarVoice.ForeignKeyTableName = "";
            colvarVoice.ApplyExtendedProperties();
            this.Columns.Add(colvarVoice);

            TableSchema.TableColumn colvarIsPlay = new TableSchema.TableColumn(this);
            colvarIsPlay.ColumnName = "IsPlay";
            colvarIsPlay.DataType = DbType.Boolean;
            colvarIsPlay.MaxLength = 0;
            colvarIsPlay.AutoIncrement = false;
            colvarIsPlay.IsNullable = true;
            colvarIsPlay.IsPrimaryKey = false;
            colvarIsPlay.IsForeignKey = false;
            colvarIsPlay.IsReadOnly = false;

            colvarIsPlay.DefaultSetting = @"";
            colvarIsPlay.ForeignKeyTableName = "";
            colvarIsPlay.ApplyExtendedProperties();
            this.Columns.Add(colvarIsPlay);

            TableSchema.TableColumn colvarFromUser = new TableSchema.TableColumn(this);
            colvarFromUser.ColumnName = "FromUser";
            colvarFromUser.DataType = DbType.Int32;
            colvarFromUser.MaxLength = 0;
            colvarFromUser.AutoIncrement = false;
            colvarFromUser.IsNullable = true;
            colvarFromUser.IsPrimaryKey = false;
            colvarFromUser.IsForeignKey = false;
            colvarFromUser.IsReadOnly = false;

            colvarFromUser.DefaultSetting = @"";
            colvarFromUser.ForeignKeyTableName = "";
            colvarFromUser.ApplyExtendedProperties();
            this.Columns.Add(colvarFromUser);

            TableSchema.TableColumn colvarToUser = new TableSchema.TableColumn(this);
            colvarToUser.ColumnName = "ToUser";
            colvarToUser.DataType = DbType.Int32;
            colvarToUser.MaxLength = 0;
            colvarToUser.AutoIncrement = false;
            colvarToUser.IsNullable = true;
            colvarToUser.IsPrimaryKey = false;
            colvarToUser.IsForeignKey = false;
            colvarToUser.IsReadOnly = false;

            colvarToUser.DefaultSetting = @"";
            colvarToUser.ForeignKeyTableName = "";
            colvarToUser.ApplyExtendedProperties();
            this.Columns.Add(colvarToUser);
        }
예제 #52
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("Sys_CIE10", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "ID";
                colvarId.DataType            = DbType.Int32;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarCapitulo = new TableSchema.TableColumn(schema);
                colvarCapitulo.ColumnName          = "CAPITULO";
                colvarCapitulo.DataType            = DbType.String;
                colvarCapitulo.MaxLength           = 255;
                colvarCapitulo.AutoIncrement       = false;
                colvarCapitulo.IsNullable          = true;
                colvarCapitulo.IsPrimaryKey        = false;
                colvarCapitulo.IsForeignKey        = false;
                colvarCapitulo.IsReadOnly          = false;
                colvarCapitulo.DefaultSetting      = @"";
                colvarCapitulo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCapitulo);

                TableSchema.TableColumn colvarGRUPOCIE10 = new TableSchema.TableColumn(schema);
                colvarGRUPOCIE10.ColumnName          = "GRUPOCIE10";
                colvarGRUPOCIE10.DataType            = DbType.String;
                colvarGRUPOCIE10.MaxLength           = 255;
                colvarGRUPOCIE10.AutoIncrement       = false;
                colvarGRUPOCIE10.IsNullable          = true;
                colvarGRUPOCIE10.IsPrimaryKey        = false;
                colvarGRUPOCIE10.IsForeignKey        = false;
                colvarGRUPOCIE10.IsReadOnly          = false;
                colvarGRUPOCIE10.DefaultSetting      = @"";
                colvarGRUPOCIE10.ForeignKeyTableName = "";
                schema.Columns.Add(colvarGRUPOCIE10);

                TableSchema.TableColumn colvarCausa = new TableSchema.TableColumn(schema);
                colvarCausa.ColumnName          = "CAUSA";
                colvarCausa.DataType            = DbType.String;
                colvarCausa.MaxLength           = 255;
                colvarCausa.AutoIncrement       = false;
                colvarCausa.IsNullable          = true;
                colvarCausa.IsPrimaryKey        = false;
                colvarCausa.IsForeignKey        = false;
                colvarCausa.IsReadOnly          = false;
                colvarCausa.DefaultSetting      = @"";
                colvarCausa.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCausa);

                TableSchema.TableColumn colvarSubcausa = new TableSchema.TableColumn(schema);
                colvarSubcausa.ColumnName          = "SUBCAUSA";
                colvarSubcausa.DataType            = DbType.String;
                colvarSubcausa.MaxLength           = 255;
                colvarSubcausa.AutoIncrement       = false;
                colvarSubcausa.IsNullable          = true;
                colvarSubcausa.IsPrimaryKey        = false;
                colvarSubcausa.IsForeignKey        = false;
                colvarSubcausa.IsReadOnly          = false;
                colvarSubcausa.DefaultSetting      = @"";
                colvarSubcausa.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSubcausa);

                TableSchema.TableColumn colvarCodigo = new TableSchema.TableColumn(schema);
                colvarCodigo.ColumnName          = "CODIGO";
                colvarCodigo.DataType            = DbType.String;
                colvarCodigo.MaxLength           = 255;
                colvarCodigo.AutoIncrement       = false;
                colvarCodigo.IsNullable          = true;
                colvarCodigo.IsPrimaryKey        = false;
                colvarCodigo.IsForeignKey        = false;
                colvarCodigo.IsReadOnly          = false;
                colvarCodigo.DefaultSetting      = @"";
                colvarCodigo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCodigo);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName          = "Nombre";
                colvarNombre.DataType            = DbType.String;
                colvarNombre.MaxLength           = 255;
                colvarNombre.AutoIncrement       = false;
                colvarNombre.IsNullable          = true;
                colvarNombre.IsPrimaryKey        = false;
                colvarNombre.IsForeignKey        = false;
                colvarNombre.IsReadOnly          = false;
                colvarNombre.DefaultSetting      = @"";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarSinonimo = new TableSchema.TableColumn(schema);
                colvarSinonimo.ColumnName    = "Sinonimo";
                colvarSinonimo.DataType      = DbType.String;
                colvarSinonimo.MaxLength     = 255;
                colvarSinonimo.AutoIncrement = false;
                colvarSinonimo.IsNullable    = true;
                colvarSinonimo.IsPrimaryKey  = false;
                colvarSinonimo.IsForeignKey  = false;
                colvarSinonimo.IsReadOnly    = false;

                colvarSinonimo.DefaultSetting      = @"('')";
                colvarSinonimo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSinonimo);

                TableSchema.TableColumn colvarDescripCap = new TableSchema.TableColumn(schema);
                colvarDescripCap.ColumnName          = "DescripCap";
                colvarDescripCap.DataType            = DbType.String;
                colvarDescripCap.MaxLength           = 255;
                colvarDescripCap.AutoIncrement       = false;
                colvarDescripCap.IsNullable          = true;
                colvarDescripCap.IsPrimaryKey        = false;
                colvarDescripCap.IsForeignKey        = false;
                colvarDescripCap.IsReadOnly          = false;
                colvarDescripCap.DefaultSetting      = @"";
                colvarDescripCap.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDescripCap);

                TableSchema.TableColumn colvarModif = new TableSchema.TableColumn(schema);
                colvarModif.ColumnName          = "Modif";
                colvarModif.DataType            = DbType.Double;
                colvarModif.MaxLength           = 0;
                colvarModif.AutoIncrement       = false;
                colvarModif.IsNullable          = true;
                colvarModif.IsPrimaryKey        = false;
                colvarModif.IsForeignKey        = false;
                colvarModif.IsReadOnly          = false;
                colvarModif.DefaultSetting      = @"";
                colvarModif.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModif);

                TableSchema.TableColumn colvarCepsap = new TableSchema.TableColumn(schema);
                colvarCepsap.ColumnName          = "CEPSAP";
                colvarCepsap.DataType            = DbType.String;
                colvarCepsap.MaxLength           = 50;
                colvarCepsap.AutoIncrement       = false;
                colvarCepsap.IsNullable          = true;
                colvarCepsap.IsPrimaryKey        = false;
                colvarCepsap.IsForeignKey        = false;
                colvarCepsap.IsReadOnly          = false;
                colvarCepsap.DefaultSetting      = @"";
                colvarCepsap.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCepsap);

                TableSchema.TableColumn colvarC2 = new TableSchema.TableColumn(schema);
                colvarC2.ColumnName    = "C2";
                colvarC2.DataType      = DbType.Boolean;
                colvarC2.MaxLength     = 0;
                colvarC2.AutoIncrement = false;
                colvarC2.IsNullable    = false;
                colvarC2.IsPrimaryKey  = false;
                colvarC2.IsForeignKey  = false;
                colvarC2.IsReadOnly    = false;

                colvarC2.DefaultSetting      = @"((0))";
                colvarC2.ForeignKeyTableName = "";
                schema.Columns.Add(colvarC2);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("Sys_CIE10", schema);
            }
        }
예제 #53
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarItemID = new TableSchema.TableColumn(this);
            colvarItemID.ColumnName = "ItemID";
            colvarItemID.DataType = DbType.Int32;
            colvarItemID.MaxLength = 0;
            colvarItemID.AutoIncrement = false;
            colvarItemID.IsNullable = false;
            colvarItemID.IsPrimaryKey = false;
            colvarItemID.IsForeignKey = false;
            colvarItemID.IsReadOnly = false;

            colvarItemID.DefaultSetting = @"";
            colvarItemID.ForeignKeyTableName = "";
            colvarItemID.ApplyExtendedProperties();
            this.Columns.Add(colvarItemID);

            TableSchema.TableColumn colvarCompanyItemID = new TableSchema.TableColumn(this);
            colvarCompanyItemID.ColumnName = "CompanyItemID";
            colvarCompanyItemID.DataType = DbType.Int32;
            colvarCompanyItemID.MaxLength = 0;
            colvarCompanyItemID.AutoIncrement = false;
            colvarCompanyItemID.IsNullable = false;
            colvarCompanyItemID.IsPrimaryKey = false;
            colvarCompanyItemID.IsForeignKey = false;
            colvarCompanyItemID.IsReadOnly = false;

            colvarCompanyItemID.DefaultSetting = @"";
            colvarCompanyItemID.ForeignKeyTableName = "";
            colvarCompanyItemID.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyItemID);

            TableSchema.TableColumn colvarMemberID = new TableSchema.TableColumn(this);
            colvarMemberID.ColumnName = "MemberID";
            colvarMemberID.DataType = DbType.Int32;
            colvarMemberID.MaxLength = 0;
            colvarMemberID.AutoIncrement = false;
            colvarMemberID.IsNullable = false;
            colvarMemberID.IsPrimaryKey = false;
            colvarMemberID.IsForeignKey = false;
            colvarMemberID.IsReadOnly = false;

            colvarMemberID.DefaultSetting = @"";
            colvarMemberID.ForeignKeyTableName = "";
            colvarMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarMemberID);

            TableSchema.TableColumn colvarItemDate = new TableSchema.TableColumn(this);
            colvarItemDate.ColumnName = "ItemDate";
            colvarItemDate.DataType = DbType.DateTime;
            colvarItemDate.MaxLength = 0;
            colvarItemDate.AutoIncrement = false;
            colvarItemDate.IsNullable = false;
            colvarItemDate.IsPrimaryKey = false;
            colvarItemDate.IsForeignKey = false;
            colvarItemDate.IsReadOnly = false;

            colvarItemDate.DefaultSetting = @"";
            colvarItemDate.ForeignKeyTableName = "";
            colvarItemDate.ApplyExtendedProperties();
            this.Columns.Add(colvarItemDate);

            TableSchema.TableColumn colvarItemStatus = new TableSchema.TableColumn(this);
            colvarItemStatus.ColumnName = "ItemStatus";
            colvarItemStatus.DataType = DbType.Int32;
            colvarItemStatus.MaxLength = 0;
            colvarItemStatus.AutoIncrement = false;
            colvarItemStatus.IsNullable = false;
            colvarItemStatus.IsPrimaryKey = false;
            colvarItemStatus.IsForeignKey = false;
            colvarItemStatus.IsReadOnly = false;

            colvarItemStatus.DefaultSetting = @"";
            colvarItemStatus.ForeignKeyTableName = "";
            colvarItemStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarItemStatus);

            TableSchema.TableColumn colvarSetDate = new TableSchema.TableColumn(this);
            colvarSetDate.ColumnName = "SetDate";
            colvarSetDate.DataType = DbType.DateTime;
            colvarSetDate.MaxLength = 0;
            colvarSetDate.AutoIncrement = false;
            colvarSetDate.IsNullable = true;
            colvarSetDate.IsPrimaryKey = false;
            colvarSetDate.IsForeignKey = false;
            colvarSetDate.IsReadOnly = false;

            colvarSetDate.DefaultSetting = @"";
            colvarSetDate.ForeignKeyTableName = "";
            colvarSetDate.ApplyExtendedProperties();
            this.Columns.Add(colvarSetDate);

            TableSchema.TableColumn colvarOrderSum = new TableSchema.TableColumn(this);
            colvarOrderSum.ColumnName = "OrderSum";
            colvarOrderSum.DataType = DbType.Decimal;
            colvarOrderSum.MaxLength = 0;
            colvarOrderSum.AutoIncrement = false;
            colvarOrderSum.IsNullable = true;
            colvarOrderSum.IsPrimaryKey = false;
            colvarOrderSum.IsForeignKey = false;
            colvarOrderSum.IsReadOnly = false;

            colvarOrderSum.DefaultSetting = @"";
            colvarOrderSum.ForeignKeyTableName = "";
            colvarOrderSum.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderSum);

            TableSchema.TableColumn colvarCompanyID = new TableSchema.TableColumn(this);
            colvarCompanyID.ColumnName = "CompanyID";
            colvarCompanyID.DataType = DbType.Int32;
            colvarCompanyID.MaxLength = 0;
            colvarCompanyID.AutoIncrement = false;
            colvarCompanyID.IsNullable = true;
            colvarCompanyID.IsPrimaryKey = false;
            colvarCompanyID.IsForeignKey = false;
            colvarCompanyID.IsReadOnly = false;

            colvarCompanyID.DefaultSetting = @"";
            colvarCompanyID.ForeignKeyTableName = "";
            colvarCompanyID.ApplyExtendedProperties();
            this.Columns.Add(colvarCompanyID);

            TableSchema.TableColumn colvarItemPoint = new TableSchema.TableColumn(this);
            colvarItemPoint.ColumnName = "ItemPoint";
            colvarItemPoint.DataType = DbType.Decimal;
            colvarItemPoint.MaxLength = 0;
            colvarItemPoint.AutoIncrement = false;
            colvarItemPoint.IsNullable = true;
            colvarItemPoint.IsPrimaryKey = false;
            colvarItemPoint.IsForeignKey = false;
            colvarItemPoint.IsReadOnly = false;

            colvarItemPoint.DefaultSetting = @"";
            colvarItemPoint.ForeignKeyTableName = "";
            colvarItemPoint.ApplyExtendedProperties();
            this.Columns.Add(colvarItemPoint);

            TableSchema.TableColumn colvarPaymentID = new TableSchema.TableColumn(this);
            colvarPaymentID.ColumnName = "PaymentID";
            colvarPaymentID.DataType = DbType.Int32;
            colvarPaymentID.MaxLength = 0;
            colvarPaymentID.AutoIncrement = false;
            colvarPaymentID.IsNullable = true;
            colvarPaymentID.IsPrimaryKey = false;
            colvarPaymentID.IsForeignKey = false;
            colvarPaymentID.IsReadOnly = false;

            colvarPaymentID.DefaultSetting = @"";
            colvarPaymentID.ForeignKeyTableName = "";
            colvarPaymentID.ApplyExtendedProperties();
            this.Columns.Add(colvarPaymentID);

            TableSchema.TableColumn colvarIsCanModifiedDate = new TableSchema.TableColumn(this);
            colvarIsCanModifiedDate.ColumnName = "IsCanModifiedDate";
            colvarIsCanModifiedDate.DataType = DbType.Boolean;
            colvarIsCanModifiedDate.MaxLength = 0;
            colvarIsCanModifiedDate.AutoIncrement = false;
            colvarIsCanModifiedDate.IsNullable = true;
            colvarIsCanModifiedDate.IsPrimaryKey = false;
            colvarIsCanModifiedDate.IsForeignKey = false;
            colvarIsCanModifiedDate.IsReadOnly = false;

            colvarIsCanModifiedDate.DefaultSetting = @"";
            colvarIsCanModifiedDate.ForeignKeyTableName = "";
            colvarIsCanModifiedDate.ApplyExtendedProperties();
            this.Columns.Add(colvarIsCanModifiedDate);

            TableSchema.TableColumn colvarOrderDate = new TableSchema.TableColumn(this);
            colvarOrderDate.ColumnName = "OrderDate";
            colvarOrderDate.DataType = DbType.DateTime;
            colvarOrderDate.MaxLength = 0;
            colvarOrderDate.AutoIncrement = false;
            colvarOrderDate.IsNullable = true;
            colvarOrderDate.IsPrimaryKey = false;
            colvarOrderDate.IsForeignKey = false;
            colvarOrderDate.IsReadOnly = false;

            colvarOrderDate.DefaultSetting = @"";
            colvarOrderDate.ForeignKeyTableName = "";
            colvarOrderDate.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderDate);
        }
예제 #54
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("SalesReason", TableType.Table, DataService.GetInstance("Default"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"Sales";
                //columns

                TableSchema.TableColumn colvarSalesReasonID = new TableSchema.TableColumn(schema);
                colvarSalesReasonID.ColumnName          = "SalesReasonID";
                colvarSalesReasonID.DataType            = DbType.Int32;
                colvarSalesReasonID.MaxLength           = 0;
                colvarSalesReasonID.AutoIncrement       = true;
                colvarSalesReasonID.IsNullable          = false;
                colvarSalesReasonID.IsPrimaryKey        = true;
                colvarSalesReasonID.IsForeignKey        = false;
                colvarSalesReasonID.IsReadOnly          = false;
                colvarSalesReasonID.DefaultSetting      = @"";
                colvarSalesReasonID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSalesReasonID);

                TableSchema.TableColumn colvarName = new TableSchema.TableColumn(schema);
                colvarName.ColumnName          = "Name";
                colvarName.DataType            = DbType.String;
                colvarName.MaxLength           = 50;
                colvarName.AutoIncrement       = false;
                colvarName.IsNullable          = false;
                colvarName.IsPrimaryKey        = false;
                colvarName.IsForeignKey        = false;
                colvarName.IsReadOnly          = false;
                colvarName.DefaultSetting      = @"";
                colvarName.ForeignKeyTableName = "";
                schema.Columns.Add(colvarName);

                TableSchema.TableColumn colvarReasonType = new TableSchema.TableColumn(schema);
                colvarReasonType.ColumnName          = "ReasonType";
                colvarReasonType.DataType            = DbType.String;
                colvarReasonType.MaxLength           = 50;
                colvarReasonType.AutoIncrement       = false;
                colvarReasonType.IsNullable          = false;
                colvarReasonType.IsPrimaryKey        = false;
                colvarReasonType.IsForeignKey        = false;
                colvarReasonType.IsReadOnly          = false;
                colvarReasonType.DefaultSetting      = @"";
                colvarReasonType.ForeignKeyTableName = "";
                schema.Columns.Add(colvarReasonType);

                TableSchema.TableColumn colvarModifiedDate = new TableSchema.TableColumn(schema);
                colvarModifiedDate.ColumnName    = "ModifiedDate";
                colvarModifiedDate.DataType      = DbType.DateTime;
                colvarModifiedDate.MaxLength     = 0;
                colvarModifiedDate.AutoIncrement = false;
                colvarModifiedDate.IsNullable    = false;
                colvarModifiedDate.IsPrimaryKey  = false;
                colvarModifiedDate.IsForeignKey  = false;
                colvarModifiedDate.IsReadOnly    = false;

                colvarModifiedDate.DefaultSetting      = @"(getdate())";
                colvarModifiedDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarModifiedDate);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["Default"].AddSchema("SalesReason", schema);
            }
        }
예제 #55
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = false;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarOrderCode = new TableSchema.TableColumn(this);
            colvarOrderCode.ColumnName = "OrderCode";
            colvarOrderCode.DataType = DbType.String;
            colvarOrderCode.MaxLength = 50;
            colvarOrderCode.AutoIncrement = false;
            colvarOrderCode.IsNullable = false;
            colvarOrderCode.IsPrimaryKey = false;
            colvarOrderCode.IsForeignKey = false;
            colvarOrderCode.IsReadOnly = false;

            colvarOrderCode.DefaultSetting = @"";
            colvarOrderCode.ForeignKeyTableName = "";
            colvarOrderCode.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderCode);

            TableSchema.TableColumn colvarOrderDate = new TableSchema.TableColumn(this);
            colvarOrderDate.ColumnName = "OrderDate";
            colvarOrderDate.DataType = DbType.DateTime;
            colvarOrderDate.MaxLength = 0;
            colvarOrderDate.AutoIncrement = false;
            colvarOrderDate.IsNullable = false;
            colvarOrderDate.IsPrimaryKey = false;
            colvarOrderDate.IsForeignKey = false;
            colvarOrderDate.IsReadOnly = false;

            colvarOrderDate.DefaultSetting = @"";
            colvarOrderDate.ForeignKeyTableName = "";
            colvarOrderDate.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderDate);

            TableSchema.TableColumn colvarOrderCard = new TableSchema.TableColumn(this);
            colvarOrderCard.ColumnName = "OrderCard";
            colvarOrderCard.DataType = DbType.String;
            colvarOrderCard.MaxLength = 50;
            colvarOrderCard.AutoIncrement = false;
            colvarOrderCard.IsNullable = false;
            colvarOrderCard.IsPrimaryKey = false;
            colvarOrderCard.IsForeignKey = false;
            colvarOrderCard.IsReadOnly = false;

            colvarOrderCard.DefaultSetting = @"";
            colvarOrderCard.ForeignKeyTableName = "";
            colvarOrderCard.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderCard);

            TableSchema.TableColumn colvarOrderMemberID = new TableSchema.TableColumn(this);
            colvarOrderMemberID.ColumnName = "OrderMemberID";
            colvarOrderMemberID.DataType = DbType.Int32;
            colvarOrderMemberID.MaxLength = 0;
            colvarOrderMemberID.AutoIncrement = false;
            colvarOrderMemberID.IsNullable = false;
            colvarOrderMemberID.IsPrimaryKey = false;
            colvarOrderMemberID.IsForeignKey = false;
            colvarOrderMemberID.IsReadOnly = false;

            colvarOrderMemberID.DefaultSetting = @"";
            colvarOrderMemberID.ForeignKeyTableName = "";
            colvarOrderMemberID.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderMemberID);

            TableSchema.TableColumn colvarOrderSellerID = new TableSchema.TableColumn(this);
            colvarOrderSellerID.ColumnName = "OrderSellerID";
            colvarOrderSellerID.DataType = DbType.Int32;
            colvarOrderSellerID.MaxLength = 0;
            colvarOrderSellerID.AutoIncrement = false;
            colvarOrderSellerID.IsNullable = false;
            colvarOrderSellerID.IsPrimaryKey = false;
            colvarOrderSellerID.IsForeignKey = false;
            colvarOrderSellerID.IsReadOnly = false;

            colvarOrderSellerID.DefaultSetting = @"";
            colvarOrderSellerID.ForeignKeyTableName = "";
            colvarOrderSellerID.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderSellerID);

            TableSchema.TableColumn colvarOrderProduct = new TableSchema.TableColumn(this);
            colvarOrderProduct.ColumnName = "OrderProduct";
            colvarOrderProduct.DataType = DbType.String;
            colvarOrderProduct.MaxLength = 800;
            colvarOrderProduct.AutoIncrement = false;
            colvarOrderProduct.IsNullable = true;
            colvarOrderProduct.IsPrimaryKey = false;
            colvarOrderProduct.IsForeignKey = false;
            colvarOrderProduct.IsReadOnly = false;

            colvarOrderProduct.DefaultSetting = @"";
            colvarOrderProduct.ForeignKeyTableName = "";
            colvarOrderProduct.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderProduct);

            TableSchema.TableColumn colvarOrderQty = new TableSchema.TableColumn(this);
            colvarOrderQty.ColumnName = "OrderQty";
            colvarOrderQty.DataType = DbType.Int32;
            colvarOrderQty.MaxLength = 0;
            colvarOrderQty.AutoIncrement = false;
            colvarOrderQty.IsNullable = true;
            colvarOrderQty.IsPrimaryKey = false;
            colvarOrderQty.IsForeignKey = false;
            colvarOrderQty.IsReadOnly = false;

            colvarOrderQty.DefaultSetting = @"";
            colvarOrderQty.ForeignKeyTableName = "";
            colvarOrderQty.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderQty);

            TableSchema.TableColumn colvarOrderSum = new TableSchema.TableColumn(this);
            colvarOrderSum.ColumnName = "OrderSum";
            colvarOrderSum.DataType = DbType.Decimal;
            colvarOrderSum.MaxLength = 0;
            colvarOrderSum.AutoIncrement = false;
            colvarOrderSum.IsNullable = true;
            colvarOrderSum.IsPrimaryKey = false;
            colvarOrderSum.IsForeignKey = false;
            colvarOrderSum.IsReadOnly = false;

            colvarOrderSum.DefaultSetting = @"";
            colvarOrderSum.ForeignKeyTableName = "";
            colvarOrderSum.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderSum);

            TableSchema.TableColumn colvarOrderSumOk = new TableSchema.TableColumn(this);
            colvarOrderSumOk.ColumnName = "OrderSumOk";
            colvarOrderSumOk.DataType = DbType.Decimal;
            colvarOrderSumOk.MaxLength = 0;
            colvarOrderSumOk.AutoIncrement = false;
            colvarOrderSumOk.IsNullable = true;
            colvarOrderSumOk.IsPrimaryKey = false;
            colvarOrderSumOk.IsForeignKey = false;
            colvarOrderSumOk.IsReadOnly = false;

            colvarOrderSumOk.DefaultSetting = @"";
            colvarOrderSumOk.ForeignKeyTableName = "";
            colvarOrderSumOk.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderSumOk);

            TableSchema.TableColumn colvarOrderRateSale = new TableSchema.TableColumn(this);
            colvarOrderRateSale.ColumnName = "OrderRateSale";
            colvarOrderRateSale.DataType = DbType.Decimal;
            colvarOrderRateSale.MaxLength = 0;
            colvarOrderRateSale.AutoIncrement = false;
            colvarOrderRateSale.IsNullable = true;
            colvarOrderRateSale.IsPrimaryKey = false;
            colvarOrderRateSale.IsForeignKey = false;
            colvarOrderRateSale.IsReadOnly = false;

            colvarOrderRateSale.DefaultSetting = @"";
            colvarOrderRateSale.ForeignKeyTableName = "";
            colvarOrderRateSale.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderRateSale);

            TableSchema.TableColumn colvarOrderRate = new TableSchema.TableColumn(this);
            colvarOrderRate.ColumnName = "OrderRate";
            colvarOrderRate.DataType = DbType.Decimal;
            colvarOrderRate.MaxLength = 0;
            colvarOrderRate.AutoIncrement = false;
            colvarOrderRate.IsNullable = true;
            colvarOrderRate.IsPrimaryKey = false;
            colvarOrderRate.IsForeignKey = false;
            colvarOrderRate.IsReadOnly = false;

            colvarOrderRate.DefaultSetting = @"";
            colvarOrderRate.ForeignKeyTableName = "";
            colvarOrderRate.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderRate);

            TableSchema.TableColumn colvarOrderPoint = new TableSchema.TableColumn(this);
            colvarOrderPoint.ColumnName = "OrderPoint";
            colvarOrderPoint.DataType = DbType.Decimal;
            colvarOrderPoint.MaxLength = 0;
            colvarOrderPoint.AutoIncrement = false;
            colvarOrderPoint.IsNullable = true;
            colvarOrderPoint.IsPrimaryKey = false;
            colvarOrderPoint.IsForeignKey = false;
            colvarOrderPoint.IsReadOnly = false;

            colvarOrderPoint.DefaultSetting = @"";
            colvarOrderPoint.ForeignKeyTableName = "";
            colvarOrderPoint.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderPoint);

            TableSchema.TableColumn colvarOrderPay = new TableSchema.TableColumn(this);
            colvarOrderPay.ColumnName = "OrderPay";
            colvarOrderPay.DataType = DbType.Decimal;
            colvarOrderPay.MaxLength = 0;
            colvarOrderPay.AutoIncrement = false;
            colvarOrderPay.IsNullable = true;
            colvarOrderPay.IsPrimaryKey = false;
            colvarOrderPay.IsForeignKey = false;
            colvarOrderPay.IsReadOnly = false;

            colvarOrderPay.DefaultSetting = @"";
            colvarOrderPay.ForeignKeyTableName = "";
            colvarOrderPay.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderPay);

            TableSchema.TableColumn colvarOrderPayCash = new TableSchema.TableColumn(this);
            colvarOrderPayCash.ColumnName = "OrderPayCash";
            colvarOrderPayCash.DataType = DbType.Decimal;
            colvarOrderPayCash.MaxLength = 0;
            colvarOrderPayCash.AutoIncrement = false;
            colvarOrderPayCash.IsNullable = true;
            colvarOrderPayCash.IsPrimaryKey = false;
            colvarOrderPayCash.IsForeignKey = false;
            colvarOrderPayCash.IsReadOnly = false;

            colvarOrderPayCash.DefaultSetting = @"";
            colvarOrderPayCash.ForeignKeyTableName = "";
            colvarOrderPayCash.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderPayCash);

            TableSchema.TableColumn colvarOrderPayPoint = new TableSchema.TableColumn(this);
            colvarOrderPayPoint.ColumnName = "OrderPayPoint";
            colvarOrderPayPoint.DataType = DbType.Decimal;
            colvarOrderPayPoint.MaxLength = 0;
            colvarOrderPayPoint.AutoIncrement = false;
            colvarOrderPayPoint.IsNullable = true;
            colvarOrderPayPoint.IsPrimaryKey = false;
            colvarOrderPayPoint.IsForeignKey = false;
            colvarOrderPayPoint.IsReadOnly = false;

            colvarOrderPayPoint.DefaultSetting = @"";
            colvarOrderPayPoint.ForeignKeyTableName = "";
            colvarOrderPayPoint.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderPayPoint);

            TableSchema.TableColumn colvarOrderDateUpload = new TableSchema.TableColumn(this);
            colvarOrderDateUpload.ColumnName = "OrderDateUpload";
            colvarOrderDateUpload.DataType = DbType.DateTime;
            colvarOrderDateUpload.MaxLength = 0;
            colvarOrderDateUpload.AutoIncrement = false;
            colvarOrderDateUpload.IsNullable = false;
            colvarOrderDateUpload.IsPrimaryKey = false;
            colvarOrderDateUpload.IsForeignKey = false;
            colvarOrderDateUpload.IsReadOnly = false;

            colvarOrderDateUpload.DefaultSetting = @"";
            colvarOrderDateUpload.ForeignKeyTableName = "";
            colvarOrderDateUpload.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderDateUpload);

            TableSchema.TableColumn colvarOrderDateDeliver = new TableSchema.TableColumn(this);
            colvarOrderDateDeliver.ColumnName = "OrderDateDeliver";
            colvarOrderDateDeliver.DataType = DbType.DateTime;
            colvarOrderDateDeliver.MaxLength = 0;
            colvarOrderDateDeliver.AutoIncrement = false;
            colvarOrderDateDeliver.IsNullable = false;
            colvarOrderDateDeliver.IsPrimaryKey = false;
            colvarOrderDateDeliver.IsForeignKey = false;
            colvarOrderDateDeliver.IsReadOnly = false;

            colvarOrderDateDeliver.DefaultSetting = @"";
            colvarOrderDateDeliver.ForeignKeyTableName = "";
            colvarOrderDateDeliver.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderDateDeliver);

            TableSchema.TableColumn colvarOrderStatus = new TableSchema.TableColumn(this);
            colvarOrderStatus.ColumnName = "OrderStatus";
            colvarOrderStatus.DataType = DbType.Int32;
            colvarOrderStatus.MaxLength = 0;
            colvarOrderStatus.AutoIncrement = false;
            colvarOrderStatus.IsNullable = false;
            colvarOrderStatus.IsPrimaryKey = false;
            colvarOrderStatus.IsForeignKey = false;
            colvarOrderStatus.IsReadOnly = false;

            colvarOrderStatus.DefaultSetting = @"";
            colvarOrderStatus.ForeignKeyTableName = "";
            colvarOrderStatus.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderStatus);

            TableSchema.TableColumn colvarOrderMemo = new TableSchema.TableColumn(this);
            colvarOrderMemo.ColumnName = "OrderMemo";
            colvarOrderMemo.DataType = DbType.String;
            colvarOrderMemo.MaxLength = 200;
            colvarOrderMemo.AutoIncrement = false;
            colvarOrderMemo.IsNullable = false;
            colvarOrderMemo.IsPrimaryKey = false;
            colvarOrderMemo.IsForeignKey = false;
            colvarOrderMemo.IsReadOnly = false;

            colvarOrderMemo.DefaultSetting = @"";
            colvarOrderMemo.ForeignKeyTableName = "";
            colvarOrderMemo.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderMemo);

            TableSchema.TableColumn colvarOrderType = new TableSchema.TableColumn(this);
            colvarOrderType.ColumnName = "OrderType";
            colvarOrderType.DataType = DbType.Int32;
            colvarOrderType.MaxLength = 0;
            colvarOrderType.AutoIncrement = false;
            colvarOrderType.IsNullable = true;
            colvarOrderType.IsPrimaryKey = false;
            colvarOrderType.IsForeignKey = false;
            colvarOrderType.IsReadOnly = false;

            colvarOrderType.DefaultSetting = @"";
            colvarOrderType.ForeignKeyTableName = "";
            colvarOrderType.ApplyExtendedProperties();
            this.Columns.Add(colvarOrderType);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("InternalPurchaseTable", TableType.Table, DataService.GetInstance("WWIprov"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "ID";
                colvarId.DataType            = DbType.Int32;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarInvoiceNumber = new TableSchema.TableColumn(schema);
                colvarInvoiceNumber.ColumnName     = "InvoiceNumber";
                colvarInvoiceNumber.DataType       = DbType.Int32;
                colvarInvoiceNumber.MaxLength      = 0;
                colvarInvoiceNumber.AutoIncrement  = false;
                colvarInvoiceNumber.IsNullable     = true;
                colvarInvoiceNumber.IsPrimaryKey   = false;
                colvarInvoiceNumber.IsForeignKey   = true;
                colvarInvoiceNumber.IsReadOnly     = false;
                colvarInvoiceNumber.DefaultSetting = @"";

                colvarInvoiceNumber.ForeignKeyTableName = "InternalInvoiceTable";
                schema.Columns.Add(colvarInvoiceNumber);

                TableSchema.TableColumn colvarSupplierID = new TableSchema.TableColumn(schema);
                colvarSupplierID.ColumnName          = "SupplierID";
                colvarSupplierID.DataType            = DbType.Int32;
                colvarSupplierID.MaxLength           = 0;
                colvarSupplierID.AutoIncrement       = false;
                colvarSupplierID.IsNullable          = true;
                colvarSupplierID.IsPrimaryKey        = false;
                colvarSupplierID.IsForeignKey        = false;
                colvarSupplierID.IsReadOnly          = false;
                colvarSupplierID.DefaultSetting      = @"";
                colvarSupplierID.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSupplierID);

                TableSchema.TableColumn colvarEstimatedAmount = new TableSchema.TableColumn(schema);
                colvarEstimatedAmount.ColumnName          = "EstimatedAmount";
                colvarEstimatedAmount.DataType            = DbType.Single;
                colvarEstimatedAmount.MaxLength           = 0;
                colvarEstimatedAmount.AutoIncrement       = false;
                colvarEstimatedAmount.IsNullable          = true;
                colvarEstimatedAmount.IsPrimaryKey        = false;
                colvarEstimatedAmount.IsForeignKey        = false;
                colvarEstimatedAmount.IsReadOnly          = false;
                colvarEstimatedAmount.DefaultSetting      = @"";
                colvarEstimatedAmount.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEstimatedAmount);

                TableSchema.TableColumn colvarEstimationDate = new TableSchema.TableColumn(schema);
                colvarEstimationDate.ColumnName          = "EstimationDate";
                colvarEstimationDate.DataType            = DbType.DateTime;
                colvarEstimationDate.MaxLength           = 0;
                colvarEstimationDate.AutoIncrement       = false;
                colvarEstimationDate.IsNullable          = true;
                colvarEstimationDate.IsPrimaryKey        = false;
                colvarEstimationDate.IsForeignKey        = false;
                colvarEstimationDate.IsReadOnly          = false;
                colvarEstimationDate.DefaultSetting      = @"";
                colvarEstimationDate.ForeignKeyTableName = "";
                schema.Columns.Add(colvarEstimationDate);

                TableSchema.TableColumn colvarAmount = new TableSchema.TableColumn(schema);
                colvarAmount.ColumnName          = "Amount";
                colvarAmount.DataType            = DbType.Single;
                colvarAmount.MaxLength           = 0;
                colvarAmount.AutoIncrement       = false;
                colvarAmount.IsNullable          = true;
                colvarAmount.IsPrimaryKey        = false;
                colvarAmount.IsForeignKey        = false;
                colvarAmount.IsReadOnly          = false;
                colvarAmount.DefaultSetting      = @"";
                colvarAmount.ForeignKeyTableName = "";
                schema.Columns.Add(colvarAmount);

                TableSchema.TableColumn colvarDatePassed = new TableSchema.TableColumn(schema);
                colvarDatePassed.ColumnName          = "DatePassed";
                colvarDatePassed.DataType            = DbType.DateTime;
                colvarDatePassed.MaxLength           = 0;
                colvarDatePassed.AutoIncrement       = false;
                colvarDatePassed.IsNullable          = true;
                colvarDatePassed.IsPrimaryKey        = false;
                colvarDatePassed.IsForeignKey        = false;
                colvarDatePassed.IsReadOnly          = false;
                colvarDatePassed.DefaultSetting      = @"";
                colvarDatePassed.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDatePassed);

                TableSchema.TableColumn colvarPurchaseInvNumber = new TableSchema.TableColumn(schema);
                colvarPurchaseInvNumber.ColumnName          = "PurchaseInvNumber";
                colvarPurchaseInvNumber.DataType            = DbType.String;
                colvarPurchaseInvNumber.MaxLength           = 50;
                colvarPurchaseInvNumber.AutoIncrement       = false;
                colvarPurchaseInvNumber.IsNullable          = true;
                colvarPurchaseInvNumber.IsPrimaryKey        = false;
                colvarPurchaseInvNumber.IsForeignKey        = false;
                colvarPurchaseInvNumber.IsReadOnly          = false;
                colvarPurchaseInvNumber.DefaultSetting      = @"";
                colvarPurchaseInvNumber.ForeignKeyTableName = "";
                schema.Columns.Add(colvarPurchaseInvNumber);

                TableSchema.TableColumn colvarRemarks = new TableSchema.TableColumn(schema);
                colvarRemarks.ColumnName          = "Remarks";
                colvarRemarks.DataType            = DbType.String;
                colvarRemarks.MaxLength           = 50;
                colvarRemarks.AutoIncrement       = false;
                colvarRemarks.IsNullable          = true;
                colvarRemarks.IsPrimaryKey        = false;
                colvarRemarks.IsForeignKey        = false;
                colvarRemarks.IsReadOnly          = false;
                colvarRemarks.DefaultSetting      = @"";
                colvarRemarks.ForeignKeyTableName = "";
                schema.Columns.Add(colvarRemarks);

                TableSchema.TableColumn colvarValueForProfit = new TableSchema.TableColumn(schema);
                colvarValueForProfit.ColumnName          = "ValueForProfit";
                colvarValueForProfit.DataType            = DbType.Single;
                colvarValueForProfit.MaxLength           = 0;
                colvarValueForProfit.AutoIncrement       = false;
                colvarValueForProfit.IsNullable          = true;
                colvarValueForProfit.IsPrimaryKey        = false;
                colvarValueForProfit.IsForeignKey        = false;
                colvarValueForProfit.IsReadOnly          = false;
                colvarValueForProfit.DefaultSetting      = @"";
                colvarValueForProfit.ForeignKeyTableName = "";
                schema.Columns.Add(colvarValueForProfit);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["WWIprov"].AddSchema("InternalPurchaseTable", schema);
            }
        }
예제 #57
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarKey = new TableSchema.TableColumn(this);
            colvarKey.ColumnName = "Key";
            colvarKey.DataType = DbType.String;
            colvarKey.MaxLength = 100;
            colvarKey.AutoIncrement = false;
            colvarKey.IsNullable = false;
            colvarKey.IsPrimaryKey = false;
            colvarKey.IsForeignKey = false;
            colvarKey.IsReadOnly = false;

            colvarKey.DefaultSetting = @"";
            colvarKey.ForeignKeyTableName = "";
            colvarKey.ApplyExtendedProperties();
            this.Columns.Add(colvarKey);

            TableSchema.TableColumn colvarValueX = new TableSchema.TableColumn(this);
            colvarValueX.ColumnName = "Value";
            colvarValueX.DataType = DbType.String;
            colvarValueX.MaxLength = 500;
            colvarValueX.AutoIncrement = false;
            colvarValueX.IsNullable = true;
            colvarValueX.IsPrimaryKey = false;
            colvarValueX.IsForeignKey = false;
            colvarValueX.IsReadOnly = false;

            colvarValueX.DefaultSetting = @"";
            colvarValueX.ForeignKeyTableName = "";
            colvarValueX.ApplyExtendedProperties();
            this.Columns.Add(colvarValueX);

            TableSchema.TableColumn colvarDescribe = new TableSchema.TableColumn(this);
            colvarDescribe.ColumnName = "Describe";
            colvarDescribe.DataType = DbType.String;
            colvarDescribe.MaxLength = 500;
            colvarDescribe.AutoIncrement = false;
            colvarDescribe.IsNullable = true;
            colvarDescribe.IsPrimaryKey = false;
            colvarDescribe.IsForeignKey = false;
            colvarDescribe.IsReadOnly = false;

            colvarDescribe.DefaultSetting = @"";
            colvarDescribe.ForeignKeyTableName = "";
            colvarDescribe.ApplyExtendedProperties();
            this.Columns.Add(colvarDescribe);

            TableSchema.TableColumn colvarLan = new TableSchema.TableColumn(this);
            colvarLan.ColumnName = "Lan";
            colvarLan.DataType = DbType.String;
            colvarLan.MaxLength = 8;
            colvarLan.AutoIncrement = false;
            colvarLan.IsNullable = false;
            colvarLan.IsPrimaryKey = false;
            colvarLan.IsForeignKey = false;
            colvarLan.IsReadOnly = false;

            colvarLan.DefaultSetting = @"(N'zh')";
            colvarLan.ForeignKeyTableName = "";
            colvarLan.ApplyExtendedProperties();
            this.Columns.Add(colvarLan);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #58
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("TST_AfiliadosISSN", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName          = "id";
                colvarId.DataType            = DbType.Int32;
                colvarId.MaxLength           = 0;
                colvarId.AutoIncrement       = true;
                colvarId.IsNullable          = false;
                colvarId.IsPrimaryKey        = true;
                colvarId.IsForeignKey        = false;
                colvarId.IsReadOnly          = false;
                colvarId.DefaultSetting      = @"";
                colvarId.ForeignKeyTableName = "";
                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarTipoDoc = new TableSchema.TableColumn(schema);
                colvarTipoDoc.ColumnName          = "TipoDoc";
                colvarTipoDoc.DataType            = DbType.AnsiString;
                colvarTipoDoc.MaxLength           = 3;
                colvarTipoDoc.AutoIncrement       = false;
                colvarTipoDoc.IsNullable          = true;
                colvarTipoDoc.IsPrimaryKey        = false;
                colvarTipoDoc.IsForeignKey        = false;
                colvarTipoDoc.IsReadOnly          = false;
                colvarTipoDoc.DefaultSetting      = @"";
                colvarTipoDoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarTipoDoc);

                TableSchema.TableColumn colvarNroDoc = new TableSchema.TableColumn(schema);
                colvarNroDoc.ColumnName          = "NroDoc";
                colvarNroDoc.DataType            = DbType.Int32;
                colvarNroDoc.MaxLength           = 0;
                colvarNroDoc.AutoIncrement       = false;
                colvarNroDoc.IsNullable          = true;
                colvarNroDoc.IsPrimaryKey        = false;
                colvarNroDoc.IsForeignKey        = false;
                colvarNroDoc.IsReadOnly          = false;
                colvarNroDoc.DefaultSetting      = @"";
                colvarNroDoc.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNroDoc);

                TableSchema.TableColumn colvarApeNom = new TableSchema.TableColumn(schema);
                colvarApeNom.ColumnName          = "ApeNom";
                colvarApeNom.DataType            = DbType.AnsiString;
                colvarApeNom.MaxLength           = 25;
                colvarApeNom.AutoIncrement       = false;
                colvarApeNom.IsNullable          = true;
                colvarApeNom.IsPrimaryKey        = false;
                colvarApeNom.IsForeignKey        = false;
                colvarApeNom.IsReadOnly          = false;
                colvarApeNom.DefaultSetting      = @"";
                colvarApeNom.ForeignKeyTableName = "";
                schema.Columns.Add(colvarApeNom);

                TableSchema.TableColumn colvarDomicilio = new TableSchema.TableColumn(schema);
                colvarDomicilio.ColumnName          = "Domicilio";
                colvarDomicilio.DataType            = DbType.AnsiString;
                colvarDomicilio.MaxLength           = 25;
                colvarDomicilio.AutoIncrement       = false;
                colvarDomicilio.IsNullable          = true;
                colvarDomicilio.IsPrimaryKey        = false;
                colvarDomicilio.IsForeignKey        = false;
                colvarDomicilio.IsReadOnly          = false;
                colvarDomicilio.DefaultSetting      = @"";
                colvarDomicilio.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDomicilio);

                TableSchema.TableColumn colvarSimilarityLocalidad = new TableSchema.TableColumn(schema);
                colvarSimilarityLocalidad.ColumnName          = "_Similarity_Localidad";
                colvarSimilarityLocalidad.DataType            = DbType.Single;
                colvarSimilarityLocalidad.MaxLength           = 0;
                colvarSimilarityLocalidad.AutoIncrement       = false;
                colvarSimilarityLocalidad.IsNullable          = true;
                colvarSimilarityLocalidad.IsPrimaryKey        = false;
                colvarSimilarityLocalidad.IsForeignKey        = false;
                colvarSimilarityLocalidad.IsReadOnly          = false;
                colvarSimilarityLocalidad.DefaultSetting      = @"";
                colvarSimilarityLocalidad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSimilarityLocalidad);

                TableSchema.TableColumn colvarReparticion = new TableSchema.TableColumn(schema);
                colvarReparticion.ColumnName          = "Reparticion";
                colvarReparticion.DataType            = DbType.AnsiString;
                colvarReparticion.MaxLength           = 4;
                colvarReparticion.AutoIncrement       = false;
                colvarReparticion.IsNullable          = true;
                colvarReparticion.IsPrimaryKey        = false;
                colvarReparticion.IsForeignKey        = false;
                colvarReparticion.IsReadOnly          = false;
                colvarReparticion.DefaultSetting      = @"";
                colvarReparticion.ForeignKeyTableName = "";
                schema.Columns.Add(colvarReparticion);

                TableSchema.TableColumn colvarNroAfiliado = new TableSchema.TableColumn(schema);
                colvarNroAfiliado.ColumnName          = "NroAfiliado";
                colvarNroAfiliado.DataType            = DbType.AnsiString;
                colvarNroAfiliado.MaxLength           = 6;
                colvarNroAfiliado.AutoIncrement       = false;
                colvarNroAfiliado.IsNullable          = true;
                colvarNroAfiliado.IsPrimaryKey        = false;
                colvarNroAfiliado.IsForeignKey        = false;
                colvarNroAfiliado.IsReadOnly          = false;
                colvarNroAfiliado.DefaultSetting      = @"";
                colvarNroAfiliado.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNroAfiliado);

                TableSchema.TableColumn colvarCarga = new TableSchema.TableColumn(schema);
                colvarCarga.ColumnName          = "Carga";
                colvarCarga.DataType            = DbType.AnsiString;
                colvarCarga.MaxLength           = 2;
                colvarCarga.AutoIncrement       = false;
                colvarCarga.IsNullable          = true;
                colvarCarga.IsPrimaryKey        = false;
                colvarCarga.IsForeignKey        = false;
                colvarCarga.IsReadOnly          = false;
                colvarCarga.DefaultSetting      = @"";
                colvarCarga.ForeignKeyTableName = "";
                schema.Columns.Add(colvarCarga);

                TableSchema.TableColumn colvarFechaNacimiento = new TableSchema.TableColumn(schema);
                colvarFechaNacimiento.ColumnName          = "FechaNacimiento";
                colvarFechaNacimiento.DataType            = DbType.AnsiString;
                colvarFechaNacimiento.MaxLength           = 8;
                colvarFechaNacimiento.AutoIncrement       = false;
                colvarFechaNacimiento.IsNullable          = true;
                colvarFechaNacimiento.IsPrimaryKey        = false;
                colvarFechaNacimiento.IsForeignKey        = false;
                colvarFechaNacimiento.IsReadOnly          = false;
                colvarFechaNacimiento.DefaultSetting      = @"";
                colvarFechaNacimiento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaNacimiento);

                TableSchema.TableColumn colvarFechaIngreso = new TableSchema.TableColumn(schema);
                colvarFechaIngreso.ColumnName          = "FechaIngreso";
                colvarFechaIngreso.DataType            = DbType.AnsiString;
                colvarFechaIngreso.MaxLength           = 8;
                colvarFechaIngreso.AutoIncrement       = false;
                colvarFechaIngreso.IsNullable          = true;
                colvarFechaIngreso.IsPrimaryKey        = false;
                colvarFechaIngreso.IsForeignKey        = false;
                colvarFechaIngreso.IsReadOnly          = false;
                colvarFechaIngreso.DefaultSetting      = @"";
                colvarFechaIngreso.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaIngreso);

                TableSchema.TableColumn colvarFechaVencimiento = new TableSchema.TableColumn(schema);
                colvarFechaVencimiento.ColumnName          = "FechaVencimiento";
                colvarFechaVencimiento.DataType            = DbType.AnsiString;
                colvarFechaVencimiento.MaxLength           = 8;
                colvarFechaVencimiento.AutoIncrement       = false;
                colvarFechaVencimiento.IsNullable          = true;
                colvarFechaVencimiento.IsPrimaryKey        = false;
                colvarFechaVencimiento.IsForeignKey        = false;
                colvarFechaVencimiento.IsReadOnly          = false;
                colvarFechaVencimiento.DefaultSetting      = @"";
                colvarFechaVencimiento.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaVencimiento);

                TableSchema.TableColumn colvarLocalidadOriginal = new TableSchema.TableColumn(schema);
                colvarLocalidadOriginal.ColumnName          = "LocalidadOriginal";
                colvarLocalidadOriginal.DataType            = DbType.AnsiString;
                colvarLocalidadOriginal.MaxLength           = 20;
                colvarLocalidadOriginal.AutoIncrement       = false;
                colvarLocalidadOriginal.IsNullable          = true;
                colvarLocalidadOriginal.IsPrimaryKey        = false;
                colvarLocalidadOriginal.IsForeignKey        = false;
                colvarLocalidadOriginal.IsReadOnly          = false;
                colvarLocalidadOriginal.DefaultSetting      = @"";
                colvarLocalidadOriginal.ForeignKeyTableName = "";
                schema.Columns.Add(colvarLocalidadOriginal);

                TableSchema.TableColumn colvarSysLocalidad = new TableSchema.TableColumn(schema);
                colvarSysLocalidad.ColumnName          = "sys_Localidad";
                colvarSysLocalidad.DataType            = DbType.String;
                colvarSysLocalidad.MaxLength           = 100;
                colvarSysLocalidad.AutoIncrement       = false;
                colvarSysLocalidad.IsNullable          = true;
                colvarSysLocalidad.IsPrimaryKey        = false;
                colvarSysLocalidad.IsForeignKey        = false;
                colvarSysLocalidad.IsReadOnly          = false;
                colvarSysLocalidad.DefaultSetting      = @"";
                colvarSysLocalidad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSysLocalidad);

                TableSchema.TableColumn colvarIdLocalidad = new TableSchema.TableColumn(schema);
                colvarIdLocalidad.ColumnName          = "idLocalidad";
                colvarIdLocalidad.DataType            = DbType.Int32;
                colvarIdLocalidad.MaxLength           = 0;
                colvarIdLocalidad.AutoIncrement       = false;
                colvarIdLocalidad.IsNullable          = true;
                colvarIdLocalidad.IsPrimaryKey        = false;
                colvarIdLocalidad.IsForeignKey        = false;
                colvarIdLocalidad.IsReadOnly          = false;
                colvarIdLocalidad.DefaultSetting      = @"";
                colvarIdLocalidad.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdLocalidad);

                TableSchema.TableColumn colvarSimilarity = new TableSchema.TableColumn(schema);
                colvarSimilarity.ColumnName          = "_Similarity";
                colvarSimilarity.DataType            = DbType.Single;
                colvarSimilarity.MaxLength           = 0;
                colvarSimilarity.AutoIncrement       = false;
                colvarSimilarity.IsNullable          = true;
                colvarSimilarity.IsPrimaryKey        = false;
                colvarSimilarity.IsForeignKey        = false;
                colvarSimilarity.IsReadOnly          = false;
                colvarSimilarity.DefaultSetting      = @"";
                colvarSimilarity.ForeignKeyTableName = "";
                schema.Columns.Add(colvarSimilarity);

                TableSchema.TableColumn colvarConfidence = new TableSchema.TableColumn(schema);
                colvarConfidence.ColumnName          = "_Confidence";
                colvarConfidence.DataType            = DbType.Single;
                colvarConfidence.MaxLength           = 0;
                colvarConfidence.AutoIncrement       = false;
                colvarConfidence.IsNullable          = true;
                colvarConfidence.IsPrimaryKey        = false;
                colvarConfidence.IsForeignKey        = false;
                colvarConfidence.IsReadOnly          = false;
                colvarConfidence.DefaultSetting      = @"";
                colvarConfidence.ForeignKeyTableName = "";
                schema.Columns.Add(colvarConfidence);

                TableSchema.TableColumn colvarApellido = new TableSchema.TableColumn(schema);
                colvarApellido.ColumnName          = "Apellido";
                colvarApellido.DataType            = DbType.AnsiString;
                colvarApellido.MaxLength           = 25;
                colvarApellido.AutoIncrement       = false;
                colvarApellido.IsNullable          = true;
                colvarApellido.IsPrimaryKey        = false;
                colvarApellido.IsForeignKey        = false;
                colvarApellido.IsReadOnly          = false;
                colvarApellido.DefaultSetting      = @"";
                colvarApellido.ForeignKeyTableName = "";
                schema.Columns.Add(colvarApellido);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName          = "Nombre";
                colvarNombre.DataType            = DbType.AnsiString;
                colvarNombre.MaxLength           = 25;
                colvarNombre.AutoIncrement       = false;
                colvarNombre.IsNullable          = true;
                colvarNombre.IsPrimaryKey        = false;
                colvarNombre.IsForeignKey        = false;
                colvarNombre.IsReadOnly          = false;
                colvarNombre.DefaultSetting      = @"";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarFechaNacimiento2 = new TableSchema.TableColumn(schema);
                colvarFechaNacimiento2.ColumnName          = "FechaNacimiento2";
                colvarFechaNacimiento2.DataType            = DbType.DateTime;
                colvarFechaNacimiento2.MaxLength           = 0;
                colvarFechaNacimiento2.AutoIncrement       = false;
                colvarFechaNacimiento2.IsNullable          = true;
                colvarFechaNacimiento2.IsPrimaryKey        = false;
                colvarFechaNacimiento2.IsForeignKey        = false;
                colvarFechaNacimiento2.IsReadOnly          = false;
                colvarFechaNacimiento2.DefaultSetting      = @"";
                colvarFechaNacimiento2.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaNacimiento2);

                TableSchema.TableColumn colvarFechaIngreso2 = new TableSchema.TableColumn(schema);
                colvarFechaIngreso2.ColumnName          = "FechaIngreso2";
                colvarFechaIngreso2.DataType            = DbType.DateTime;
                colvarFechaIngreso2.MaxLength           = 0;
                colvarFechaIngreso2.AutoIncrement       = false;
                colvarFechaIngreso2.IsNullable          = true;
                colvarFechaIngreso2.IsPrimaryKey        = false;
                colvarFechaIngreso2.IsForeignKey        = false;
                colvarFechaIngreso2.IsReadOnly          = false;
                colvarFechaIngreso2.DefaultSetting      = @"";
                colvarFechaIngreso2.ForeignKeyTableName = "";
                schema.Columns.Add(colvarFechaIngreso2);

                TableSchema.TableColumn colvarNumeroAfiliado = new TableSchema.TableColumn(schema);
                colvarNumeroAfiliado.ColumnName          = "NumeroAfiliado";
                colvarNumeroAfiliado.DataType            = DbType.AnsiString;
                colvarNumeroAfiliado.MaxLength           = 14;
                colvarNumeroAfiliado.AutoIncrement       = false;
                colvarNumeroAfiliado.IsNullable          = true;
                colvarNumeroAfiliado.IsPrimaryKey        = false;
                colvarNumeroAfiliado.IsForeignKey        = false;
                colvarNumeroAfiliado.IsReadOnly          = false;
                colvarNumeroAfiliado.DefaultSetting      = @"";
                colvarNumeroAfiliado.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNumeroAfiliado);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("TST_AfiliadosISSN", schema);
            }
        }
예제 #59
0
        protected override void Initital()
        {
            //Schema define
            this.Columns = new TableSchema.TableColumnCollection();
            this.SchemaName = @"dbo";
            this.TableType = TableType.Table;
            //columns

            TableSchema.TableColumn colvarId = new TableSchema.TableColumn(this);
            colvarId.ColumnName = "ID";
            colvarId.DataType = DbType.Int32;
            colvarId.MaxLength = 0;
            colvarId.AutoIncrement = true;
            colvarId.IsNullable = false;
            colvarId.IsPrimaryKey = true;
            colvarId.IsForeignKey = false;
            colvarId.IsReadOnly = false;

            colvarId.DefaultSetting = @"";
            colvarId.ForeignKeyTableName = "";
            colvarId.ApplyExtendedProperties();
            this.Columns.Add(colvarId);

            TableSchema.TableColumn colvarName = new TableSchema.TableColumn(this);
            colvarName.ColumnName = "Name";
            colvarName.DataType = DbType.String;
            colvarName.MaxLength = 50;
            colvarName.AutoIncrement = false;
            colvarName.IsNullable = true;
            colvarName.IsPrimaryKey = false;
            colvarName.IsForeignKey = false;
            colvarName.IsReadOnly = false;

            colvarName.DefaultSetting = @"";
            colvarName.ForeignKeyTableName = "";
            colvarName.ApplyExtendedProperties();
            this.Columns.Add(colvarName);

            TableSchema.TableColumn colvarPId = new TableSchema.TableColumn(this);
            colvarPId.ColumnName = "P_ID";
            colvarPId.DataType = DbType.Int32;
            colvarPId.MaxLength = 0;
            colvarPId.AutoIncrement = false;
            colvarPId.IsNullable = true;
            colvarPId.IsPrimaryKey = false;
            colvarPId.IsForeignKey = false;
            colvarPId.IsReadOnly = false;

            colvarPId.DefaultSetting = @"";
            colvarPId.ForeignKeyTableName = "";
            colvarPId.ApplyExtendedProperties();
            this.Columns.Add(colvarPId);

            TableSchema.TableColumn colvarSubSysId = new TableSchema.TableColumn(this);
            colvarSubSysId.ColumnName = "SubSys_ID";
            colvarSubSysId.DataType = DbType.Int32;
            colvarSubSysId.MaxLength = 0;
            colvarSubSysId.AutoIncrement = false;
            colvarSubSysId.IsNullable = true;
            colvarSubSysId.IsPrimaryKey = false;
            colvarSubSysId.IsForeignKey = false;
            colvarSubSysId.IsReadOnly = false;

            colvarSubSysId.DefaultSetting = @"";
            colvarSubSysId.ForeignKeyTableName = "";
            colvarSubSysId.ApplyExtendedProperties();
            this.Columns.Add(colvarSubSysId);

            TableSchema.TableColumn colvarUId = new TableSchema.TableColumn(this);
            colvarUId.ColumnName = "U_ID";
            colvarUId.DataType = DbType.Int32;
            colvarUId.MaxLength = 0;
            colvarUId.AutoIncrement = false;
            colvarUId.IsNullable = true;
            colvarUId.IsPrimaryKey = false;
            colvarUId.IsForeignKey = false;
            colvarUId.IsReadOnly = false;

            colvarUId.DefaultSetting = @"";
            colvarUId.ForeignKeyTableName = "";
            colvarUId.ApplyExtendedProperties();
            this.Columns.Add(colvarUId);

            TableSchema.TableColumn colvarPath = new TableSchema.TableColumn(this);
            colvarPath.ColumnName = "Path";
            colvarPath.DataType = DbType.String;
            colvarPath.MaxLength = 250;
            colvarPath.AutoIncrement = false;
            colvarPath.IsNullable = true;
            colvarPath.IsPrimaryKey = false;
            colvarPath.IsForeignKey = false;
            colvarPath.IsReadOnly = false;

            colvarPath.DefaultSetting = @"";
            colvarPath.ForeignKeyTableName = "";
            colvarPath.ApplyExtendedProperties();
            this.Columns.Add(colvarPath);

            TableSchema.TableColumn colvarSort = new TableSchema.TableColumn(this);
            colvarSort.ColumnName = "Sort";
            colvarSort.DataType = DbType.Int32;
            colvarSort.MaxLength = 0;
            colvarSort.AutoIncrement = false;
            colvarSort.IsNullable = true;
            colvarSort.IsPrimaryKey = false;
            colvarSort.IsForeignKey = false;
            colvarSort.IsReadOnly = false;

            colvarSort.DefaultSetting = @"";
            colvarSort.ForeignKeyTableName = "";
            colvarSort.ApplyExtendedProperties();
            this.Columns.Add(colvarSort);

            TableSchema.TableColumn colvarKeyWord = new TableSchema.TableColumn(this);
            colvarKeyWord.ColumnName = "KeyWord";
            colvarKeyWord.DataType = DbType.String;
            colvarKeyWord.MaxLength = 250;
            colvarKeyWord.AutoIncrement = false;
            colvarKeyWord.IsNullable = true;
            colvarKeyWord.IsPrimaryKey = false;
            colvarKeyWord.IsForeignKey = false;
            colvarKeyWord.IsReadOnly = false;

            colvarKeyWord.DefaultSetting = @"";
            colvarKeyWord.ForeignKeyTableName = "";
            colvarKeyWord.ApplyExtendedProperties();
            this.Columns.Add(colvarKeyWord);

            TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(this);
            colvarCreatedBy.ColumnName = "CreatedBy";
            colvarCreatedBy.DataType = DbType.Int32;
            colvarCreatedBy.MaxLength = 0;
            colvarCreatedBy.AutoIncrement = false;
            colvarCreatedBy.IsNullable = true;
            colvarCreatedBy.IsPrimaryKey = false;
            colvarCreatedBy.IsForeignKey = false;
            colvarCreatedBy.IsReadOnly = false;

            colvarCreatedBy.DefaultSetting = @"";
            colvarCreatedBy.ForeignKeyTableName = "";
            colvarCreatedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedBy);

            TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(this);
            colvarCreatedOn.ColumnName = "CreatedOn";
            colvarCreatedOn.DataType = DbType.DateTime;
            colvarCreatedOn.MaxLength = 0;
            colvarCreatedOn.AutoIncrement = false;
            colvarCreatedOn.IsNullable = true;
            colvarCreatedOn.IsPrimaryKey = false;
            colvarCreatedOn.IsForeignKey = false;
            colvarCreatedOn.IsReadOnly = false;

            colvarCreatedOn.DefaultSetting = @"";
            colvarCreatedOn.ForeignKeyTableName = "";
            colvarCreatedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarCreatedOn);

            TableSchema.TableColumn colvarModifiedBy = new TableSchema.TableColumn(this);
            colvarModifiedBy.ColumnName = "ModifiedBy";
            colvarModifiedBy.DataType = DbType.Int32;
            colvarModifiedBy.MaxLength = 0;
            colvarModifiedBy.AutoIncrement = false;
            colvarModifiedBy.IsNullable = true;
            colvarModifiedBy.IsPrimaryKey = false;
            colvarModifiedBy.IsForeignKey = false;
            colvarModifiedBy.IsReadOnly = false;

            colvarModifiedBy.DefaultSetting = @"";
            colvarModifiedBy.ForeignKeyTableName = "";
            colvarModifiedBy.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedBy);

            TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(this);
            colvarModifiedOn.ColumnName = "ModifiedOn";
            colvarModifiedOn.DataType = DbType.DateTime;
            colvarModifiedOn.MaxLength = 0;
            colvarModifiedOn.AutoIncrement = false;
            colvarModifiedOn.IsNullable = true;
            colvarModifiedOn.IsPrimaryKey = false;
            colvarModifiedOn.IsForeignKey = false;
            colvarModifiedOn.IsReadOnly = false;

            colvarModifiedOn.DefaultSetting = @"";
            colvarModifiedOn.ForeignKeyTableName = "";
            colvarModifiedOn.ApplyExtendedProperties();
            this.Columns.Add(colvarModifiedOn);
        }
예제 #60
0
        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("Sys_Modulo", TableType.Table, DataService.GetInstance("RisProvider"));
                schema.Columns    = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarIdModulo = new TableSchema.TableColumn(schema);
                colvarIdModulo.ColumnName          = "idModulo";
                colvarIdModulo.DataType            = DbType.Int32;
                colvarIdModulo.MaxLength           = 0;
                colvarIdModulo.AutoIncrement       = true;
                colvarIdModulo.IsNullable          = false;
                colvarIdModulo.IsPrimaryKey        = true;
                colvarIdModulo.IsForeignKey        = false;
                colvarIdModulo.IsReadOnly          = false;
                colvarIdModulo.DefaultSetting      = @"";
                colvarIdModulo.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIdModulo);

                TableSchema.TableColumn colvarNombre = new TableSchema.TableColumn(schema);
                colvarNombre.ColumnName    = "nombre";
                colvarNombre.DataType      = DbType.AnsiString;
                colvarNombre.MaxLength     = 50;
                colvarNombre.AutoIncrement = false;
                colvarNombre.IsNullable    = false;
                colvarNombre.IsPrimaryKey  = false;
                colvarNombre.IsForeignKey  = false;
                colvarNombre.IsReadOnly    = false;

                colvarNombre.DefaultSetting      = @"('')";
                colvarNombre.ForeignKeyTableName = "";
                schema.Columns.Add(colvarNombre);

                TableSchema.TableColumn colvarUrl = new TableSchema.TableColumn(schema);
                colvarUrl.ColumnName          = "url";
                colvarUrl.DataType            = DbType.AnsiString;
                colvarUrl.MaxLength           = 500;
                colvarUrl.AutoIncrement       = false;
                colvarUrl.IsNullable          = true;
                colvarUrl.IsPrimaryKey        = false;
                colvarUrl.IsForeignKey        = false;
                colvarUrl.IsReadOnly          = false;
                colvarUrl.DefaultSetting      = @"";
                colvarUrl.ForeignKeyTableName = "";
                schema.Columns.Add(colvarUrl);

                TableSchema.TableColumn colvarIcono = new TableSchema.TableColumn(schema);
                colvarIcono.ColumnName          = "icono";
                colvarIcono.DataType            = DbType.AnsiString;
                colvarIcono.MaxLength           = 500;
                colvarIcono.AutoIncrement       = false;
                colvarIcono.IsNullable          = true;
                colvarIcono.IsPrimaryKey        = false;
                colvarIcono.IsForeignKey        = false;
                colvarIcono.IsReadOnly          = false;
                colvarIcono.DefaultSetting      = @"";
                colvarIcono.ForeignKeyTableName = "";
                schema.Columns.Add(colvarIcono);

                TableSchema.TableColumn colvarDescripcion = new TableSchema.TableColumn(schema);
                colvarDescripcion.ColumnName          = "descripcion";
                colvarDescripcion.DataType            = DbType.AnsiString;
                colvarDescripcion.MaxLength           = 100;
                colvarDescripcion.AutoIncrement       = false;
                colvarDescripcion.IsNullable          = true;
                colvarDescripcion.IsPrimaryKey        = false;
                colvarDescripcion.IsForeignKey        = false;
                colvarDescripcion.IsReadOnly          = false;
                colvarDescripcion.DefaultSetting      = @"";
                colvarDescripcion.ForeignKeyTableName = "";
                schema.Columns.Add(colvarDescripcion);

                TableSchema.TableColumn colvarOrden = new TableSchema.TableColumn(schema);
                colvarOrden.ColumnName    = "orden";
                colvarOrden.DataType      = DbType.Int32;
                colvarOrden.MaxLength     = 0;
                colvarOrden.AutoIncrement = false;
                colvarOrden.IsNullable    = false;
                colvarOrden.IsPrimaryKey  = false;
                colvarOrden.IsForeignKey  = false;
                colvarOrden.IsReadOnly    = false;

                colvarOrden.DefaultSetting      = @"((0))";
                colvarOrden.ForeignKeyTableName = "";
                schema.Columns.Add(colvarOrden);

                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["RisProvider"].AddSchema("Sys_Modulo", schema);
            }
        }