Пример #1
0
        private void GetMetaData()
        {
            SetStatus("Fetching Columns...");
            ColumnsHelper.GetColumns();
            backgroundWorker1.ReportProgress(5, ObjectTypes.Columns);

            SetStatus("Fetching ForeignKeys...");
            ForeignKeysHelper.GetForeignKeys();
            backgroundWorker1.ReportProgress(10, ObjectTypes.ForeignKeys);

            SetStatus("Fetching IndexColumns...");
            IndexColumnsHelper.GetIndexColumns();
            backgroundWorker1.ReportProgress(15, ObjectTypes.IndexColumns);

            SetStatus("Fetching Indexes...");
            IndexesHelper.GetIndexes();
            backgroundWorker1.ReportProgress(20, ObjectTypes.Indexes);

            SetStatus("Fetching Tables...");
            TablesHelper.GetTables();
            backgroundWorker1.ReportProgress(25, ObjectTypes.Tables);

            SetStatus("Fetching ViewColumns...");
            ViewColumnsHelper.GetViewColumns();
            backgroundWorker1.ReportProgress(30, ObjectTypes.ViewColumns);

            SetStatus("Fetching Views...");
            ViewsHelper.GetViews();
            backgroundWorker1.ReportProgress(35, ObjectTypes.Views);

            SetStatus("Fetching ProcedureParameters...");
            ProcedureParametersHelper.GetProcedureParameters();
            backgroundWorker1.ReportProgress(40, ObjectTypes.ProcedureParameters);

            SetStatus("Fetching Procedures...");
            ProceduresHelper.GetProcedures();
            backgroundWorker1.ReportProgress(45, ObjectTypes.Procedures);

            SetStatus("Fetching Triggers...");
            SMOHelper.TriggersHelper.GetTriggers(Utility.DatabaseName);
            backgroundWorker1.ReportProgress(50, ObjectTypes.Triggers);

            SetStatus("Fetching UserDefinedDataTypes...");
            SMOHelper.UserDefinedDataTypesHelper.GetUserDefinedDataTypes(Utility.DatabaseName);
            backgroundWorker1.ReportProgress(55, ObjectTypes.UserDefinedDataTypes);

            SetStatus("Fetching InstanceInformation...");
            InstanceInformationHelper.GetInstanceInformation();
            backgroundWorker1.ReportProgress(60, ObjectTypes.InstanceInformation);

            SetStatus("Fetching DataSourceInformation...");
            DataSourceInformationHelper.GetDataSourceInformation();
            backgroundWorker1.ReportProgress(65, ObjectTypes.DataSourceInformation);

            SetStatus("Fetching DataTypes...");
            DataTypesHelper.GetDataTypes();
            backgroundWorker1.ReportProgress(70, ObjectTypes.DataTypes);

            SetStatus("Fetching Restrictions...");
            RestrictionsHelper.GetRestrictions();
            backgroundWorker1.ReportProgress(75, ObjectTypes.Restrictions);

            SetStatus("Fetching ReservedWords...");
            ReservedWordsHelper.GetReservedWords();
            backgroundWorker1.ReportProgress(80, ObjectTypes.ReservedWords);

            SetStatus("Fetching Users...");
            UsersHelper.GetUsers();
            backgroundWorker1.ReportProgress(85, ObjectTypes.Users);
        }