예제 #1
0
        private void btnEmployerMasterList_Click(object sender, EventArgs e)
        {
            frmEmployers frm = new frmEmployers();

            if (!frm.IsDisposed)
            {
                frm.ShowDialog();

                // reload master employer list minus related employers
                try
                {
                    _employers = new Employers(_lstEmployerIds);
                }
                catch (MyException myex)
                {
                    MyMessageBox.Show(this, "Defendant Employers", MyDisplayMessage.FormUpdateError, myex);
                    this.Close();
                    return;
                }

                BindData();
            }
        }
예제 #2
0
        private void mnuMain_Click(object sender, EventArgs e)
        {
            if (CanChangeCurrentDefendant())
            {
                if (sender.Equals(mnuMainFileExit))
                {
                    Environment.Exit(0);
                }
                else if (sender.Equals(mnuMainToolsOptions))
                {
                    frmOptions frm = new frmOptions();
                    frm.FormClosed += new FormClosedEventHandler(frm_FormClosed);
                    frm.ShowDialog(this);

                    BindData();
                }
                else if (sender.Equals(mnuMainListsEmployers))
                {
                    frmEmployers frm = new frmEmployers();

                    if (!frm.IsDisposed)
                    {
                        frm.ShowDialog(this);
                        BindData();
                    }
                }
                else if (sender.Equals(mnuMainListsFeeTypes))
                {
                    frmFeeTypes frm = new frmFeeTypes();
                    if (!frm.IsDisposed)
                    {
                        frm.ShowDialog(this);
                        BindData();
                    }
                }
                else if (sender.Equals(mnuMainListsPaymentArrangementTypes))
                {
                    frmPaymentArrangementTypes frm = new frmPaymentArrangementTypes();
                    if (!frm.IsDisposed)
                    {
                        frm.ShowDialog(this);
                        BindData();
                    }
                }
                else if (sender.Equals(mnuMainListsRestrictedCasePrefixes))
                {
                    frmRestrictedCasePrefixes frm = new frmRestrictedCasePrefixes();
                    if (!frm.IsDisposed)
                    {
                        frm.ShowDialog(this);
                        BindData();
                    }
                }
                else if (sender.Equals(mnuMainReportsMailMerge))
                {
                    this.Cursor = Cursors.WaitCursor;

                    frmMailMerge frm = new frmMailMerge();
                    if (!frm.IsDisposed)
                    {
                        // open, but don't try to own
                        frm.Show();
                    }

                    Application.DoEvents();
                    this.Cursor = Cursors.Default;
                }
                else if (sender.Equals(mnuMainReportsSSRS))
                {
                    this.Cursor = Cursors.WaitCursor;

                    frmSSRS frm = new frmSSRS();
                    if (!frm.IsDisposed)
                    {
                        // open, but don't try to own
                        frm.Show();
                    }

                    Application.DoEvents();

                    this.Cursor = Cursors.Default;
                }
                else if (sender.Equals(mnuMainToolsOptionsPrintDelinquentLetters))
                {
                    PrintDialog diag = new PrintDialog();

                    if (diag.ShowDialog() == DialogResult.OK)
                    {
                        PrintDelinquent print = new PrintDelinquent();
                        print.PrintDocuments(diag.PrinterSettings.PrinterName, DateTime.Now);
                    }
                }
            }
        }