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(); } }
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); } }
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); } }
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); } }
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); } }