Exemple #1
0
        private void ProcessCashBlotter()
        {
            CLAS.CashBlotterRow drCB = (CLAS.CashBlotterRow)FM.GetCLASMng().DB.CashBlotter.Select("SecondConfirm is null")[0];
            bool   createsNewCB      = false;
            string processMessage    = "Process Cash Blotter (First Confirm)?";

            if (!drCB.IsFirstConfirmNull())
            {
                processMessage = "Process Cash Blotter (Second Confirm)?";
                createsNewCB   = true;
            }

            if (MessageBox.Show(processMessage, "Process Cash Blotter", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
            {
                ActivityConfig.ACSeriesRow acsr;
                if (createsNewCB)
                {
                    acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBSecondConfirmAcId));
                }
                else
                {
                    acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBFirstConfirmAcId));
                }

                this.FileForm().ReadOnly = true;
                fACWizard facwr = new fACWizard(FM, acsr.ACSeriesId, atriumBE.ACEngine.RevType.CashBlotter, CurrentRow().CashBlotterID, null);
                this.FileForm().HookupWizClose(facwr);
                facwr.Show();
            }
        }
Exemple #2
0
 private void AddNewAppointment(int NawACSeriesId)
 {
     try
     {
         fACWizard facwr;
         //Launch AcWizard Constructor to Add Appointment
         if (!IsOfficerCal)
         {
             this.FileForm().ReadOnly = true;
             facwr = new fACWizard(FM, ACEngine.Step.ACInfo, NawACSeriesId);
             this.FileForm().HookupWizClose(facwr);
             facwr.Show();
         }
         else
         {
             atriumBE.FileManager fmCurrent = FM.AtMng.GetFile(FM.AtMng.WorkingAsOfficer.MyFileId);
             facwr = new fACWizard(fmCurrent, ACEngine.Step.ACInfo, NawACSeriesId);
             facwr.ShowDialog();
             facwr.Close();
         }
     }
     catch (Exception x)
     {
         if (this.FileForm() != null)
         {
             this.FileForm().ReadOnly = false;
         }
         UIHelper.HandleUIException(x);
     }
 }
Exemple #3
0
        private void EditReschedule(int NawACSeriesId)
        {
            try
            {
                //check to see if appt has a hearing
                if (CurrentRow() != null)
                {
                    atriumBE.FileManager contextFM = FM.AtMng.GetFile(CurrentRow().FileId);

                    atriumDB.FileContactRow FCR = contextFM.GetFileContact().GetByRole("FTM");
                    bool isTM = false;

                    if (FCR != null)
                    {
                        isTM = (FCR.ContactId == FM.AtMng.WorkingAsOfficer.ContactId);
                    }

                    if (ApptIsHearing() && isTM)
                    {
                        UIHelper.CannotEditAppointment();
                    }
                    else
                    {
                        //Create Step to handle editing Appointment

                        fACWizard facwr;
                        //Launch AcWizard Constructor to Edit Appointment
                        if (!IsOfficerCal)
                        {
                            this.FileForm().ReadOnly = true;
                            GetOriginalRecurrenceAppointment(FM);
                            facwr = new fACWizard(FM, NawACSeriesId, CurrentRow().ApptId);
                            this.FileForm().HookupWizClose(facwr);
                            facwr.Show();
                        }
                        else
                        {
                            atriumBE.FileManager fmCurrent = FM.AtMng.GetFile(CurrentRow().FileId);
                            GetOriginalRecurrenceAppointment(fmCurrent);
                            facwr = new fACWizard(fmCurrent, NawACSeriesId, CurrentRow().ApptId);
                            facwr.ShowDialog();
                            facwr.Close();
                        }
                    }
                }
                else
                {
                    AddNewAppointment(NawACSeriesId);
                }
            }
            catch (Exception x)
            {
                if (this.FileForm() != null)
                {
                    this.FileForm().ReadOnly = false;
                }
                UIHelper.HandleUIException(x);
            }
        }
Exemple #4
0
 public void NewDoc(int acsId)
 {
     try
     {
         fACWizard facw = new fACWizard(FM, ACEngine.Step.ACInfo, acsId);
         if (!facw.Disposing && !facw.IsDisposed)
         {
             facw.ShowDialog(this);
             facw.Close();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Exemple #5
0
        private void uiButton1_Click(object sender, EventArgs e)
        {
            try
            {
                //launch Wizard passing ACSeries, ABP?
                NextStep ns = null;
                if (ebStepCode.Tag != null)
                {
                    ns = (NextStep)ebStepCode.Tag;
                }
                if (ns != null)
                {
                    ACEngine test = new ACEngine(fm);
                    test.TestForSteps(ns.acs.ACSeriesId);
                    if (!test.HasAnyRel & (!test.HasDoc | uiCheckBox1.Checked))
                    {
                        atriumBE.ActivityBP abp = fm.InitActivityProcess();
                        if (test.HasDoc)
                        {
                            abp.SkipDoc = uiCheckBox1.Checked;
                        }
                        abp.CreateAC(ns.acs.ACSeriesId, calActivityDate.Value, null, 0, 0, ACEngine.RevType.Nothing);
                        abp.SkipDoc           = false;
                        calActivityDate.Value = DateTime.Today;
                        ebStepCode.Text       = "";
                        ebNSType.Text         = "";
                        Init(fm, ffns);
                        ffns.MoreInfo("activity", abp.LastActivityId.Value);
                        ffns.fileToc.LoadTOC();
                    }
                    else
                    {
                        bool docIsSkipped = false;
                        if (uiCheckBox1.Checked)
                        {
                            docIsSkipped = true;
                        }

                        ebStepCode.Text = "";
                        ebNSType.Text   = "";

                        ffns.ReadOnly = true;
                        if (ns.prevAc != null)
                        {
                            facwr = new fACWizard(fm, (ACEngine.Step)ns.acs.InitialStep, ns.acs.ACSeriesId, ns.prevAc.ActivityId, docIsSkipped);
                        }
                        else
                        {
                            facwr = new fACWizard(fm, (ACEngine.Step)ns.acs.InitialStep, ns.acs.ACSeriesId, docIsSkipped);
                        }
                        facwr.setAcDate(calActivityDate.Value, ns);
                        facwr.Show();
                        calActivityDate.Value = DateTime.Today;
                        DoSkipCheck(null);
                        ffns.HookupWizClose(facwr);
                        ffns.fileToc.LoadTOC();
                    }
                }
                else
                {
                    MessageBox.Show(Properties.Resources.QuickACSelectAValidCode);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #6
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "tsProcessFirst":
                    ProcessCashBlotter();
                    break;

                case "tsProcessSecond":
                    ProcessCashBlotter();
                    break;

                case "tsSave":
                    Save();
                    break;

                case "tsDelete":
                    Delete();
                    break;

                case "cmdGoToActivity":
                    FileForm().MainForm.OpenFile(CurrentDetailRow().FileID);
                    break;

                case "cmdGoToCB":
                    fFile f1 = FileForm().MainForm.OpenFile(CurrentDetailRow().FileID);
                    f1.MoreInfo("cbdetail", CurrentDetailRow().CashBlotterDetailID);
                    break;

                case "cmdGoToGeneralFile":
                    FileForm().MainForm.OpenFile(CurrentDetailRow().FileID);
                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;

                case "tsPrintCB":
                    ActivityConfig.ACSeriesRow acsr;
                    if (CurrentRow().IsRemittedDateNull())
                    {
                        acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBPrintDraftAcId));
                    }
                    else
                    {
                        acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBPrintCopyAcId));
                    }

                    this.FileForm().ReadOnly = true;
                    fACWizard facwr = new fACWizard(FM, acsr.ACSeriesId, atriumBE.ACEngine.RevType.CashBlotter, CurrentRow().CashBlotterID, null);
                    this.FileForm().HookupWizClose(facwr);
                    facwr.Show();

                    break;
                }
                FileForm().HandleACSMenu(e, CurrentRow());
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #7
0
        private void btnRun_Click(object sender, EventArgs e)
        {
            try
            {
                List <DataRow> toAction = UIHelper.GridGetSelectedData(gridFileList);
                toAction.RemoveAll(RemoveSuccess);

                if (toAction.Count > 0 && MessageBox.Show("Are you sure you want to proceed?  You have selected " + toAction.Count.ToString() + " files.", "Mass Activity", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    string massMailingPath = null;

                    ActivityConfig.ACSeriesRow acsr = SelectedACSeries();
                    ACEngine ace = new ACEngine(fmCurrent);
                    ace.TestForSteps(acsr.ACSeriesId);
                    if (ace.HasDoc && chkConcatenate.Checked)
                    {
                        SaveFileDialog saveFileDialog1 = new SaveFileDialog();
                        saveFileDialog1.Filter   = "rtf files (*.rtf)|*.rtf|All files (*.*)|*.*";
                        saveFileDialog1.FileName = "Merge_" + acsr.StepCode.Replace(".", "") + "_" + DateTime.Today.ToString("yyyyMMdd") + ".rtf";
                        if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                        {
                            massMailingPath = saveFileDialog1.FileName;
                        }
                    }

                    docDB.DocumentRow doc2Copy = null;
                    if (acsr.ACSeriesId == AtMng.GetSetting(AppIntSetting.DocumentCopyAcId))
                    {
                        fBrowseDocs fdoc = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog;
                        massMailingPath = null;
                        if (fdoc.ShowDialog(this) == DialogResult.OK && fdoc.SelectedDocuments() != null)
                        {
                            doc2Copy = fdoc.SelectedDocument;
                        }
                        else
                        {
                            MessageBox.Show("You can't proceed without selecting a document.", "Mass Activity", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                            return;
                        }
                    }

                    //if (ctx != null && ctx.Count > 0)
                    //{
                    //we need to prompt for input
                    //launch wiz for first file to capture user input
                    lmDatasets.appDB.EFileSearchRow efsr = (lmDatasets.appDB.EFileSearchRow)toAction[0];

                    FileManager fmFirst = AtMng.GetFile(efsr.FileId);
                    fACWizard   facw;
                    lmDatasets.atriumDB.ActivityRow newAC = null;
                    if (doc2Copy != null)
                    {
                        docDB.DocumentRow docCopy = fmFirst.GetDocMng().GetDocument().MakeCopy(doc2Copy, fmFirst.CurrentFile, doc2Copy.IsDraft);
                        facw = new fACWizard(fmFirst, ACEngine.Step.Document, acsr.ACSeriesId, docCopy.DocId, "REVISE");
                    }
                    else
                    {
                        facw = new fACWizard(fmFirst, ACEngine.Step.ACInfo, acsr.ACSeriesId);
                    }
                    facw.ctx = ctx;
                    if (facw.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                    {
                        //get newly added activity
                        newAC        = fmFirst.DB.Activity[fmFirst.DB.Activity.Count - 1];
                        efsr.Result  = "Success";
                        efsr.Message = "Prototype activity";
                        efsr.EndEdit();
                        toAction.Remove(efsr);
                    }
                    else
                    {
                        MessageBox.Show("You can't proceed without completing the prototype activity.", "Mass Activity", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        return;
                    }

                    //}

                    using (fWait fProgress = new fWait("Generating activities, please wait"))
                    {
                        AtMng.MassActivity(toAction, acsr, (string)uiTemplate.SelectedValue, massMailingPath, 0, ACEngine.RevType.Document, ctx, doc2Copy, newAC);
                    }
                }
                else if (toAction.Count == 0)
                {
                    MessageBox.Show("No files selected", "Mass Activity", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #8
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdNewContact":
                    cmdNewContact1.Expand();
                    break;

                case "cmdAddExistingContact":
                    fACWizard faacw1 = new fACWizard(myfmAB, ACEngine.Step.ACInfo, UIHelper.AtMng.GetSetting(AppIntSetting.AddressBookFileContactAcId));
                    faacw1.ShowDialog();
                    faacw1.Close();
                    break;

                case "cmdCreateNewContact":
                    fACWizard faacw2 = new fACWizard(myfmAB, ACEngine.Step.ACInfo, UIHelper.AtMng.GetSetting(AppIntSetting.AddressBookNewContactAcId));
                    faacw2.ShowDialog();
                    faacw2.Close();
                    break;

                case "cmdCardView":
                    if (!e.Command.IsChecked)
                    {
                        e.Command.IsChecked = true;
                    }
                    else
                    {
                        cmdListView.IsChecked  = false;
                        fileContactGridEX.View = Janus.Windows.GridEX.View.CardView;
                        cmdGroupBy.Visible     = Janus.Windows.UI.InheritableBoolean.False;
                        cmdFilter.Visible      = Janus.Windows.UI.InheritableBoolean.False;
                        cmdFldChooser.Visible  = Janus.Windows.UI.InheritableBoolean.False;
                    }
                    break;

                case "cmdFilter":
                    if (e.Command.IsChecked)
                    {
                        fileContactGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.Automatic;
                    }
                    else
                    {
                        fileContactGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.None;
                    }
                    break;

                case "cmdFldChooser":
                    fileContactGridEX.ShowFieldChooser(this, LawMate.Properties.Resources.FieldSelector);
                    break;

                case "cmdGroupBy":
                    fileContactGridEX.GroupByBoxVisible = e.Command.IsChecked;
                    break;

                case "cmdListView":
                    if (!e.Command.IsChecked)
                    {
                        e.Command.IsChecked = true;
                    }
                    else
                    {
                        cmdCardView.IsChecked  = false;
                        fileContactGridEX.View = Janus.Windows.GridEX.View.TableView;
                        cmdGroupBy.Visible     = Janus.Windows.UI.InheritableBoolean.True;
                        cmdFilter.Visible      = Janus.Windows.UI.InheritableBoolean.True;
                        cmdFldChooser.Visible  = Janus.Windows.UI.InheritableBoolean.True;
                    }
                    break;

                case "cmdSave":
                    DoSave();
                    break;

                case "cmdDelete":
                    Delete();
                    break;

                case "cmdCancel":
                    Cancel();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }