Exemplo n.º 1
0
 private void uiButton1_Click(object sender, EventArgs e)
 {
     try
     {
         if ((string)uiButton1.Tag == "FULL")
         {
             AddBatchJob(calendarCombo1.Value, "exec PLOfficeDistribUpdate");
         }
         else
         {
             foreach (Janus.Windows.GridEX.GridEXRow gsi in pLOfficeGridEX.GetCheckedRows())
             {
                 string plOfficeId = ((appDB.PLOfficeRow)(((DataRowView)gsi.DataRow).Row)).PLOfficeID.ToString();
                 AddBatchJob(calendarCombo1.Value, "exec PLOfficeDistribUpdateSingle " + plOfficeId);
             }
         }
         SaveBatchJob();
         if (MessageBox.Show("The Office Distribution Job(s) has(have) been successfully created.\n\nDo you want to display the Batch Job Review screen?", "Office Distribution Batch Job(s) Created", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)
         {
             if (!MainAdminForm.verifyOpenForm("fBatch"))
             {
                 fBatch f = new fBatch(this.ParentForm);
                 f.Show();
                 f.WindowState = FormWindowState.Maximized;
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Exemplo n.º 2
0
        //private void dumpToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        this.saveFileDialog1.ShowDialog();
        //        string file = this.saveFileDialog1.FileName;


        //        Atmng.acMng.DB.WriteXml(file);//, XmlWriteMode.WriteSchema);
        //    }
        //    catch (Exception x)
        //    {
        //        UIHelper.HandleUIException(x);
        //    }

        //}

        //private void toolStripButton1_Click(object sender, EventArgs e)
        //{
        //    if (MdiChildren.Length > 0)
        //    {
        //        if (MessageBox.Show("All screens must be closed in order to reload the configuration data.\nIf you made any edits and want to save your changes before refreshing the data, please cancel this dialog by selecting No, save your changes, then refresh the config data.\n\nAre you sure you want to refresh the config data and close all screens automatically?", "Refresh Configuration Data", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
        //        {
        //            foreach (Form childForm in MdiChildren)
        //            {
        //                childForm.Close();
        //            }
        //            atmng.acMng.LoadAllConfigInfo();
        //            atmng.LoadDDInfo();

        //        }
        //    }
        //    else
        //    {
        //        atmng.acMng.LoadAllConfigInfo();
        //        atmng.LoadDDInfo();
        //    }
        //}


        //private void examineToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        if (MessageBox.Show("This will erase all pending changes.  Do not edit data after examining.", "Warning", MessageBoxButtons.OKCancel) == DialogResult.OK)
        //        {
        //            this.openFileDialog1.ShowDialog();
        //            string file = this.openFileDialog1.FileName;

        //            Atmng.acMng.DB.Clear();
        //            foreach (DataTable dt in Atmng.acMng.DB.Tables)
        //            {
        //                dt.BeginLoadData();
        //            }
        //            Atmng.acMng.isMerging = true;
        //            Atmng.acMng.DB.ReadXml(file);//, XmlReadMode.ReadSchema);
        //            Atmng.acMng.isMerging = false;
        //            foreach (DataTable dt in Atmng.acMng.DB.Tables)
        //            {
        //                dt.EndLoadData();
        //            }
        //            Atmng.acMng.DB.AcceptChanges();

        //        }

        //    }
        //    catch (Exception x)
        //    {
        //        UIHelper.HandleUIException(x);
        //    }

        //}

        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            Application.UseWaitCursor = true;

            try
            {
                switch (e.Command.Key)
                {
                case "cmdArchive":
                    if (!verifyOpenForm("fArchive"))
                    {
                        fArchive f = new fArchive(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdSystemMessages":
                    if (!verifyOpenForm("fSystemMessage"))
                    {
                        fSystemMessage f = new fSystemMessage(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdExportDocs":
                    fExportDocs fexp = new fExportDocs(this);
                    fexp.Show();
                    fexp.WindowState = FormWindowState.Maximized;
                    break;

                case "cmdConfigSync":
                    fConfigSync fcsy = new fConfigSync(this);
                    fcsy.Show();
                    fcsy.WindowState = FormWindowState.Maximized;
                    break;

                case "cmdWWHelp":
                    using (fWait fProgress = new fWait("Loading Deskbook Data, please wait"))
                    {
                        fHelp fh = new fHelp(this);
                        fh.Show();
                        fh.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdClose":
                    if (ActiveMdiChild != null)
                    {
                        ActiveMdiChild.Close();
                    }
                    break;

                case "cmdExit":
                    this.Close();
                    break;

                case "cmdAppSettings":
                    if (!verifyOpenForm("fAppSetting"))
                    {
                        fAppSetting f = new fAppSetting(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdReportAdmin":
                    using (fWait fProgress = new fWait("Loading Report Admin Module, please wait"))
                    {
                        if (!verifyOpenForm("fReportAdmin"))
                        {
                            fReportAdmin f = new fReportAdmin(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdActivityCode":
                    using (fWait fProgress = new fWait("Loading Activity Code Templates, please wait"))
                    {
                        if (!verifyOpenForm("fACTemplate"))
                        {
                            fACTemplate f = new fACTemplate(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdCity":
                    if (!verifyOpenForm("fCity"))
                    {
                        fCity f = new fCity(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdPLOffice":
                    using (fWait fProgress = new fWait("Loading Office File Distribution Data, please wait"))
                    {
                        if (!verifyOpenForm("fPLOffice"))
                        {
                            fPLOffice f = new fPLOffice(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdBatchReview":
                    using (fWait fProgress = new fWait("Loading Batch Job Data, please wait"))
                    {
                        if (!verifyOpenForm("fBatch"))
                        {
                            fBatch f = new fBatch(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdProvinces":
                    if (!verifyOpenForm("fProvinces"))
                    {
                        fProvinces f = new fProvinces(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdDocTemplates":
                    using (fWait fProgress = new fWait("Loading Document Templates, please wait"))
                    {
                        if (!verifyOpenForm("fTemplates"))
                        {
                            fTemplates f = new fTemplates(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdLookupTables":
                    using (fWait fProgress = new fWait("Loading Lookup Table Data, please wait"))
                    {
                        if (!verifyOpenForm("fLookup"))
                        {
                            fLookup f = new fLookup(this, true);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdLookupTablesAll":
                    using (fWait fProgress = new fWait("Loading Lookup Table Data, please wait"))
                    {
                        if (!verifyOpenForm("fLookup"))
                        {
                            fLookup f = new fLookup(this, false);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdOfficeToJD":
                    if (!verifyOpenForm("fOfficeToJudicialDistrict"))
                    {
                        fOfficeToJudicialDistrict f = new fOfficeToJudicialDistrict(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdWFDesigner":
                    LaunchWorkflowDesigner();
                    break;

                case "cmdAdhocQuery":
                    fSQL fsql = new fSQL(this);
                    fsql.Show();
                    fsql.WindowState = FormWindowState.Maximized;
                    break;

                case "cmdBFTemplates":
                    using (fWait fProgress = new fWait("Loading BF Template Data, please wait"))
                    {
                        if (!verifyOpenForm("fBFCode"))
                        {
                            fBFCode f = new fBFCode(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdIssues":
                    using (fWait fProgress = new fWait("Loading Issues, please wait"))
                    {
                        if (!verifyOpenForm("fIssues"))
                        {
                            fIssues f = new fIssues(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdOfficeMandates":
                    if (!verifyOpenForm("fOfficeMandate"))
                    {
                        fOfficeMandate f = new fOfficeMandate(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdDataDictionnary":
                    using (fWait fProgress = new fWait("Loading Data Dictionnary Data, please wait"))
                    {
                        if (!verifyOpenForm("fDataDictionnary"))
                        {
                            fDataDictionnary f = new fDataDictionnary(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdDDLookup":
                    using (fWait fProgress = new fWait("Loading DD Lookup, please wait"))
                    {
                        if (!verifyOpenForm("fDDLookup"))
                        {
                            fDDLookup f = new fDDLookup(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdSecRules":
                    using (fWait fProgress = new fWait("Loading Security Rules Data, please wait"))
                    {
                        if (!verifyOpenForm("fRules"))
                        {
                            fRules f = new fRules(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdGroups":
                    using (fWait fProgress = new fWait("Loading Security Groups Data, please wait"))
                    {
                        if (!verifyOpenForm("fGroups"))
                        {
                            fGroups f = new fGroups(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdDistList":
                    if (!verifyOpenForm("fDistributionList"))
                    {
                        fDistributionList f = new fDistributionList(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdImportExternalDocs":
                    fLoad fl = new fLoad(this);
                    fl.Show();
                    fl.WindowState = FormWindowState.Maximized;
                    break;

                case "cmdACMenu":
                    if (!verifyOpenForm("fACMenu"))
                    {
                        fACMenu f = new fACMenu(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdPeriodicFileClosure":
                    if (!verifyOpenForm("fClose"))
                    {
                        fClose f = new fClose(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdFileMetaType":
                    if (!verifyOpenForm("fFileMetaChildren"))
                    {
                        fFileMetaChildren f = new fFileMetaChildren(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;

                case "cmdOfficerPrefs":
                    using (fWait fProgress = new fWait("Loading Officer Preferences Data, please wait"))
                    {
                        if (!verifyOpenForm("fOfficerPreferences"))
                        {
                            fOfficerPreferences f = new fOfficerPreferences(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdEventLog":
                    using (fWait fProgress = new fWait("Loading Log Event Data, please wait"))
                    {
                        if (!verifyOpenForm("fLogEvent"))
                        {
                            fLogEvent f = new fLogEvent(this);
                            f.Show();
                            f.WindowState = FormWindowState.Maximized;
                        }
                    }
                    break;

                case "cmdLegislation":
                    if (!verifyOpenForm("fLegislation"))
                    {
                        fLegislation f = new fLegislation(this);
                        f.Show();
                        f.WindowState = FormWindowState.Maximized;
                    }
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
            finally
            {
                Application.UseWaitCursor = false;
            }
        }