Example #1
0
        private void btnChangeDir_Click(object sender, EventArgs e)
        {
            using (SelectPLSQLSpecDir form = new SelectPLSQLSpecDir())
            {
                form.BackendApplication  = BackendApplication;
                form.FrontendApplication = FrontendApplication;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    tbSpecFilePath.Text = ConfigurationManager.AppSettings[BackendApplication.Name + "PLSQLSpecDirectory"];
                    EnableDisableButtons();
                }
            }
        }
        private void procedurePage_ParentChanged(object sender, EventArgs e)
        {
            if (procedurePage.Parent == tabControl)
            {
                if (procedurePage.Tag as string != "Loaded")
                {
                    if (string.IsNullOrEmpty(ConfigurationManager.AppSettings[BackendApplication.Name + "PLSQLSpecDirectory"]))
                    {
                        using (SelectPLSQLSpecDir form = new SelectPLSQLSpecDir())
                        {
                            form.BackendApplication  = BackendApplication;
                            form.FrontendApplication = FrontendApplication;

                            if (form.ShowDialog() == DialogResult.Cancel)
                            {
                                // When cancelling dialog then don't continue
                                SwitchPage(targetPage);
                            }
                        }
                    }

                    if (newAction)
                    {
                        Action.Query           = null;
                        Action.StoredProcedure = new StoredProcedure();
                    }
                    else
                    {
                        Action.StoredProcedure = modelService.GetInitializedDomainObject <StoredProcedure>(Action.StoredProcedure.Id);
                    }

                    storedProcedureControl.BackendApplication = BackendApplication;
                    storedProcedureControl.createNewProcedure = newAction;
                    storedProcedureControl.Load(Action.StoredProcedure, this.IsEditable, schema);

                    if (IsEditable && !newAction)
                    {
                        storedProcedureControl.UpdateExistingProcedure();
                    }

                    procedurePage.Tag = "Loaded";
                }
                EnableDisableBtn();
                ShowMissingSPMessage();
            }
        }