public List <DatabaseNoPrimaryKey> GetDatabaseNoPrimaryKey(
            [PexAssumeUnderTest] DatabaseSchemaAccessLayer target,
            string database
            )
        {
            List <DatabaseNoPrimaryKey> result = target.GetDatabaseNoPrimaryKey(database);

            return(result);
            // TODO: add assertions to method DatabaseSchemaAccessLayerTest.GetDatabaseNoPrimaryKey(DatabaseSchemaAccessLayer, String)
        }
Esempio n. 2
0
        /// <summary>
        /// Gets the database no primary key.
        /// </summary>
        private void GetDatabaseNoPrimaryKey()
        {
            DatabaseSchemaAccessLayer databaseInfo = new DatabaseSchemaAccessLayer(this.ConnectionParams);

            List <DatabaseNoPrimaryKey> indexFragmentation = databaseInfo.GetDatabaseNoPrimaryKey(this.DatabaseName);
            int count = indexFragmentation.Count;

            if (indexFragmentation.Count > 0)
            {
                this.DataGridViewSchema.DataSource = indexFragmentation;
                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.TopRight;

                this.DataGridViewSchema.Columns[2].DefaultCellStyle.Format = "N0";
            }
        }