Ejemplo n.º 1
0
        private void UpdateNewFunctionFilterEntries()
        {
            var mapper = new TreeViewSchemaFilterMapper();

            mapper.AddTreeView(AddTreeView.TreeViewControl, null);
            var filterEntryBag = mapper.CreateSchemaFilterEntryBag();

            // because we only added the AddTreeView above IncludedSprocEntries is the list of selected
            // sprocs in the Add tab only
            var newFunctionEntries = filterEntryBag.IncludedSprocEntries.ToList();

            // if there are any new Function entries and if the user has selected to create matching Function Imports
            // then create and run a ProgressDialog while we are collecting the sproc return type info
            if (newFunctionEntries.Count > 0 &&
                chkCreateFunctionImports.Checked)
            {
                var result = ModelBuilderEngine.ShowProgressDialog(this, newFunctionEntries, Wizard.ModelBuilderSettings);
            }
        }
        private void UpdateModelBuilderFilterSettings()
        {
            var mapper         = new TreeViewSchemaFilterMapper(databaseObjectTreeView.TreeViewControl);
            var filterEntryBag = mapper.CreateSchemaFilterEntryBag();

            IList <EntityStoreSchemaFilterEntry> newFunctionEntries = new List <EntityStoreSchemaFilterEntry>();

            foreach (var entry in filterEntryBag.IncludedSprocEntries)
            {
                newFunctionEntries.Add(entry);
            }

            // if there are any new Function entries and if the user has selected to create matching Function Imports
            // then create and run a ProgressDialog while we are collecting the sproc return type info
            if (newFunctionEntries.Count > 0 &&
                chkCreateFunctionImports.Checked)
            {
                var result = ModelBuilderEngine.ShowProgressDialog(this, newFunctionEntries, Wizard.ModelBuilderSettings);
            }
        }