コード例 #1
0
        private void buttonAddDatabase_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Controller.Instance.AppConfig.TemplateFileName))
            {
                MessageBox.Show("Please select a template on the Project Details screen before adding a database.", "No Template", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            FormSelectDatabase form = new FormSelectDatabase();

            if (form.ShowAddDatabase())
            {
                ArchAngel.Providers.Database.Model.Database database = new ArchAngel.Providers.Database.Model.Database(form.DatabaseName, form.ConnectionString, form.DatabaseType);
                Controller.Instance.BllDatabase.AddDatabase(database);
                DisplayDatabaseList();
            }
        }
コード例 #2
0
        private void buttonAddDatabase_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Interfaces.SharedData.TemplateFileName))
            {
                MessageBox.Show("Please select a template on the Project Details screen before adding a database.", "No Template", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            FormSelectDatabase form = new FormSelectDatabase();

            if (form.ShowAddDatabase(ParentForm))
            {
                Model.Database database = new Model.Database(form.DatabaseName, form.ConnectionString, form.DatabaseType);

                if (ProviderInfo.TheBllDatabase == null)
                {
                    ProviderInfo.TheBllDatabase = new BLL.Database();
                }
                ProviderInfo.TheBllDatabase.AddDatabase(database);
                DisplayDatabaseList();
            }
        }
コード例 #3
0
        private void buttonAddDatabase_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Interfaces.SharedData.TemplateFileName))
            {
                MessageBox.Show("Please select a template on the Project Details screen before adding a database.", "No Template", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            FormSelectDatabase form = new FormSelectDatabase();

            if (form.ShowAddDatabase(ParentForm))
            {
                Model.Database database = new Model.Database(form.DatabaseName, form.ConnectionString, form.DatabaseType);

                if (ProviderInfo.TheBllDatabase == null)
                {
                    ProviderInfo.TheBllDatabase = new BLL.Database();
                }
                ProviderInfo.TheBllDatabase.AddDatabase(database);
                DisplayDatabaseList();
            }
        }
コード例 #4
0
        private void buttonAddDatabase_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Controller.Instance.AppConfig.TemplateFileName))
            {
                MessageBox.Show("Please select a template on the Project Details screen before adding a database.", "No Template", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            FormSelectDatabase form = new FormSelectDatabase();

            if (form.ShowAddDatabase())
            {
                ArchAngel.Providers.Database.Model.Database database = new ArchAngel.Providers.Database.Model.Database(form.DatabaseName, form.ConnectionString, form.DatabaseType);
                Controller.Instance.BllDatabase.AddDatabase(database);
                DisplayDatabaseList();
            }
        }