Пример #1
0
        /// <summary>
        /// All Identity Fields
        /// </summary>
        private void GetIdentityFields()
        {
            DatabaseSchemaAccessLayer databaseInfo = new DatabaseSchemaAccessLayer(this.ConnectionParams);

            List <DatabaseIdentityFields> identityFields = databaseInfo.GetIdentityFields(this.DatabaseName);
            int count = identityFields.Count;

            if (identityFields.Count > 0)
            {
                this.DataGridViewSchema.DataSource = identityFields;
                int dataGridViewWidth = this.DataGridViewSchema.Width;

                this.DataGridViewSchema.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                this.DataGridViewSchema.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                this.DataGridViewSchema.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                this.DataGridViewSchema.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                this.DataGridViewSchema.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight;
                this.DataGridViewSchema.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight;
                this.DataGridViewSchema.Columns[6].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight;

                this.DataGridViewSchema.Columns[4].DefaultCellStyle.Format = "N0";
                this.DataGridViewSchema.Columns[5].DefaultCellStyle.Format = "N0";
                this.DataGridViewSchema.Columns[6].DefaultCellStyle.Format = "N0";
            }
        }
        public List <DatabaseIdentityFields> GetIdentityFields(
            [PexAssumeUnderTest] DatabaseSchemaAccessLayer target,
            string database
            )
        {
            List <DatabaseIdentityFields> result = target.GetIdentityFields(database);

            return(result);
            // TODO: add assertions to method DatabaseSchemaAccessLayerTest.GetIdentityFields(DatabaseSchemaAccessLayer, String)
        }