/// <summary> /// NavBox OnAction Handler for Update Address /// </summary> /// <param name="sender"></param> /// <param name="data"></param> private void updateAddressFormNavAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Update Address form navigation action handler received invalid data"); } NavBox addrNavBox = (NavBox)sender; UpdateAddress addrForm = (UpdateAddress)data; NavBox.NavAction lookupAction = addrNavBox.Action; switch (lookupAction) { case NavBox.NavAction.BACK: this.nextState = PoliceHoldReleaseFlowState.ManageCustomer; break; case NavBox.NavAction.BACKANDSUBMIT: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Desktop(); this.nextState = PoliceHoldReleaseFlowState.PoliceHoldReleaseInfo; break; case NavBox.NavAction.HIDEANDSHOW: addrForm.Hide(); this.nextState = PoliceHoldReleaseFlowState.UpdatePhysicalDescription; break; case NavBox.NavAction.CANCEL: this.nextState = PoliceHoldReleaseFlowState.Cancel; break; default: throw new ApplicationException("" + lookupAction.ToString() + " is not a valid state for Update Address"); } this.executeNextState(); }
private void initiateAuditFormNavAction(object sender, object data) { NavBox initiateAuditNavBox = (NavBox)sender; InitiateAudit initiateAuditForm = (InitiateAudit)data; NavBox.NavAction action = initiateAuditNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } switch (action) { case NavBox.NavAction.SUBMIT: //Default happy path next state this.parentForm = initiateAuditForm; initiateAuditForm.Hide(); if (AuditDesktopSession.Instance.ActiveAudit.AuditScope == AuditScope.PARTIAL) { this.nextState = InventoryAuditFlowState.SelectCategory; } else { this.nextState = InventoryAuditFlowState.AuditManager; } break; case NavBox.NavAction.CANCEL: this.nextState = InventoryAuditFlowState.CancelFlow; break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for InitiateAudit"); } this.executeNextState(); }
/// <summary> /// NavBox OnAction Handler for Lookup Customer /// </summary> /// <param name="sender"></param> /// <param name="data"></param> private void lookupLoanBuyFormNavAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Lookup loan/buy form navigation action handler received invalid data"); } NavBox lookupLoanBuyNavBox = (NavBox)sender; NavBox.NavAction lookupAction = lookupLoanBuyNavBox.Action; if (lookupAction == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); lookupAction = NavBox.NavAction.BACK; } switch (lookupAction) { case NavBox.NavAction.CANCEL: this.nextState = ReleaseFingerprintsFlowExecutorFlowState.Cancel; break; case NavBox.NavAction.SUBMIT: this.nextState = ReleaseFingerprintsFlowExecutorFlowState.ShowBuyLoanLookupResults; break; case NavBox.NavAction.BACK: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); this.nextState = ReleaseFingerprintsFlowExecutorFlowState.BuyLoanLookup; break; default: throw new ApplicationException("" + lookupAction.ToString() + " is not a valid state for LookupLoanBuy"); } this.executeNextState(); }
private void itemSearchFormNavAction(object sender, object data) { NavBox itemSearchNavBox = (NavBox)sender; ItemSearch itemSearchForm = (ItemSearch)data; NavBox.NavAction action = itemSearchNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } switch (action) { case NavBox.NavAction.SUBMIT: if (itemSearchNavBox.IsCustom) { string custDet = itemSearchNavBox.CustomDetail; if (custDet.Equals("GetCategory") || custDet.Equals("TemporaryICN")) { itemSearchForm.Hide(); this.nextState = SaleFlowState.DescribeMerchandise; } else if (custDet.Equals("ViewItemDetails")) { //Show describe item form as show dialog int iItemIdx = GlobalDataAccessor.Instance.DesktopSession.DescribeItemPawnItemIndex; int iCategoryMask = GlobalDataAccessor.Instance.DesktopSession.CategoryXML.GetCategoryMask(GlobalDataAccessor.Instance.DesktopSession.ActiveRetail.RetailItems[iItemIdx].CategoryCode); DescribedMerchandise dmPawnItem = new DescribedMerchandise(iCategoryMask); Item pawnItem = GlobalDataAccessor.Instance.DesktopSession.ActiveRetail.RetailItems[iItemIdx]; Item.PawnItemMerge(ref pawnItem, dmPawnItem.SelectedPawnItem, true); ((CustomerProductDataVO)GlobalDataAccessor.Instance.DesktopSession.ActiveRetail).Items.Insert(0, pawnItem); // End GetCat5 populate // Placeholder for ReadOnly DescribedItem.cs DescribeItem myForm = new DescribeItem(GlobalDataAccessor.Instance.DesktopSession, CurrentContext.READ_ONLY, 0) { SelectedProKnowMatch = ((CustomerProductDataVO)GlobalDataAccessor.Instance.DesktopSession.ActiveRetail).Items[0].SelectedProKnowMatch }; myForm.ShowDialog(itemSearchForm); } else if (custDet.Equals("LookupCustomer")) { itemSearchForm.Hide(); if (GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer != null && !string.IsNullOrEmpty(GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer.CustomerNumber)) { this.nextState = SaleFlowState.ManagePawnApplication; } else { this.nextState = SaleFlowState.LookupCustomer; } } else if (custDet.Equals("Reload")) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Desktop(); this.nextState = SaleFlowState.ItemSearch; } else if (custDet.Equals("ProcessTender")) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Desktop(); this.nextState = SaleFlowState.TenderIn; } } else { //Default happy path next state this.parentForm = itemSearchForm; this.nextState = SaleFlowState.ProcessTender; } break; case NavBox.NavAction.CANCEL: this.nextState = SaleFlowState.CancelFlow; break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for ItemSearch"); } this.executeNextState(); }
/// <summary> /// The various form actions for the describe merchandise form in the new pawn loan flow /// </summary> /// <param name="sender"></param> /// <param name="data"></param> private void describeMerchFormAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Describe Merchandise form navigation action handler received invalid data"); } NavBox descMerchNavBox = (NavBox)sender; DescribeMerchandise descMerchForm = (DescribeMerchandise)data; NavBox.NavAction action = descMerchNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } switch (action) { case NavBox.NavAction.SUBMIT: if (descMerchNavBox.IsCustom) { string custDet = descMerchNavBox.CustomDetail; if (custDet.Equals("DescribeItemPFI", StringComparison.OrdinalIgnoreCase)) { this.nextState = PFIVerifyFlowState.DescribeItemPFI; } else { this.nextState = PFIVerifyFlowState.DescribeItem; } } else { this.nextState = PFIVerifyFlowState.DescribeItem; } break; case NavBox.NavAction.CANCEL: this.nextState = PFIVerifyFlowState.CancelFlow; break; case NavBox.NavAction.BACK: if (descMerchNavBox.IsCustom) { string custdet = descMerchNavBox.CustomDetail; if (custdet.Equals("PFIReplace", StringComparison.OrdinalIgnoreCase)) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); this.nextState = PFIVerifyFlowState.DescribeItemPFI; } else { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); this.nextState = PFIVerifyFlowState.PfiVerify; } } break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for Describe Merchandise"); } this.executeNextState(); }
/// <summary> /// Action class for LookupCustomerResults /// </summary> /// <param name="sender"></param> /// <param name="data"></param> private void lookupCustResultsFormNavAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Lookup customer Results form navigation action handler received invalid data"); } NavBox lookupCustResNavBox = (NavBox)sender; LookupCustomerResults lookupCustResForm = (LookupCustomerResults)data; NavBox.NavAction action = lookupCustResNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } switch (action) { case NavBox.NavAction.SUBMIT: if (lookupCustResNavBox.IsCustom) { string custDet = lookupCustResNavBox.CustomDetail; if (custDet.Equals("CreateCustomer", StringComparison.OrdinalIgnoreCase) || custDet.Equals("ManagePawnAppplication", StringComparison.OrdinalIgnoreCase) || custDet.Equals("ViewCustomerInformation", StringComparison.OrdinalIgnoreCase)) { //If release to claimant, allow customer creation if (GlobalDataAccessor.Instance.DesktopSession.ReleaseToClaimant) { this.nextState = PoliceHoldReleaseFlowState.ManageCustomer; } else { MessageBox.Show("Not a valid selection in this flow"); } } else { if (GlobalDataAccessor.Instance.DesktopSession.ReleaseToClaimant) { this.nextState = PoliceHoldReleaseFlowState.PoliceHoldReleaseInfo; } else { this.nextState = PoliceHoldReleaseFlowState.PoliceHoldReleaseList; } } } else { this.nextState = PoliceHoldReleaseFlowState.PoliceHoldReleaseList; } break; case NavBox.NavAction.BACK: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); this.nextState = PoliceHoldReleaseFlowState.LookupCustomer; break; case NavBox.NavAction.CANCEL: this.nextState = PoliceHoldReleaseFlowState.Cancel; break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for LookupCustomerResults"); } this.executeNextState(); }
private void multiplePawnItemsFormAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Manage Multiple Pawn Items form navigation action handler received invalid data"); } NavBox mmpiNavBox = (NavBox)sender; NavBox.NavAction action = mmpiNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } switch (action) { case NavBox.NavAction.SUBMIT: if (mmpiNavBox.IsCustom) { string custDet = mmpiNavBox.CustomDetail; if (custDet.Equals("DescribeMerchandise")) { this.nextState = MMPIFlowState.DescribeMerchandise; } else if (custDet.Equals("DescribeItem")) { this.nextState = MMPIFlowState.DescribeItem; } else if (custDet.Equals("ItemHistory")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.ItemHistory; this.nextState = MMPIFlowState.ExitFlowToItemHistory; } else if (custDet.Equals("ProductHistory")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.ProductHistory; this.nextState = MMPIFlowState.ExitFlowToProductHistory; } else if (custDet.Equals("Customer")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.Customer; this.nextState = MMPIFlowState.ExitFlowToLookupCustomer; } else if (custDet.Equals("ProductStats")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.Stats; this.nextState = MMPIFlowState.ExitFlowToStats; } else if (custDet.Equals("LookupCustomer")) { this.nextState = MMPIFlowState.ExitFlowToLookupCustomer; } else if (custDet.Equals("ShowVendor")) { this.nextState = MMPIFlowState.ExitFlowToVendor; } else if (custDet.Equals("CloseTabs")) { CommonAppBlocks.Instance.HideFlowTabController(); return; } } break; case NavBox.NavAction.CANCEL: this.nextState = MMPIFlowState.CancelFlow; break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for Manage Multiple Pawn Items"); } this.executeNextState(); }
/// <summary> /// The various form actions for the describe merchandise form in the new pawn loan flow /// </summary> /// <param name="sender"></param> /// <param name="data"></param> private void describeMerchFormAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Describe Merchandise form navigation action handler received invalid data"); } NavBox descMerchNavBox = (NavBox)sender; NavBox.NavAction action = descMerchNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } switch (action) { case NavBox.NavAction.SUBMIT: if (descMerchNavBox.IsCustom) { string custDet = descMerchNavBox.CustomDetail; if (custDet.Equals("ItemHistory")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.ItemHistory; this.nextState = MMPIFlowState.ExitFlowToItemHistory; } else if (custDet.Equals("ProductHistory")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.ProductHistory; this.nextState = MMPIFlowState.ExitFlowToProductHistory; } else if (custDet.Equals("LookupCustomer") || custDet.Equals("Customer")) { this.nextState = MMPIFlowState.ExitFlowToLookupCustomer; if (custDet.Equals("Customer")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.Customer; } } else if (custDet.Equals("ProductStats")) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.Stats; this.nextState = MMPIFlowState.ExitFlowToStats; } else if (custDet.Equals("CloseTabs")) { CommonAppBlocks.Instance.HideFlowTabController(); return; } else { this.nextState = MMPIFlowState.DescribeItem; } } else { this.nextState = MMPIFlowState.DescribeItem; } break; case NavBox.NavAction.CANCEL: this.nextState = MMPIFlowState.CancelFlow; break; case NavBox.NavAction.BACK: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); //If we are clicking back from desc merchandise afetr having clicked //on add item in MMPI go back to that if (parentFlowName.Equals("CustomerPurchaseFlowExecutor", StringComparison.OrdinalIgnoreCase) || parentFlowName.Equals("VendorPurchaseFlowExecutor", StringComparison.OrdinalIgnoreCase)) { if (GlobalDataAccessor.Instance.DesktopSession.ActivePurchase != null && GlobalDataAccessor.Instance.DesktopSession.ActivePurchase.Items.Count > 0) { this.nextState = MMPIFlowState.ManageMultiplePawnItems; } else { this.nextState = MMPIFlowState.CancelFlow; } break; } if (GlobalDataAccessor.Instance.DesktopSession.ActivePawnLoan != null && GlobalDataAccessor.Instance.DesktopSession.ActivePawnLoan.Items.Count > 0) { this.nextState = MMPIFlowState.ManageMultiplePawnItems; } else { this.nextState = MMPIFlowState.CancelFlow; } break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for Describe Merchandise"); } this.executeNextState(); }
private void productStatsFormNavAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Stats form navigation action handler received invalid data"); } NavBox prodstatsNavBox = (NavBox)sender; Controller_Stats prodStatsForm = (Controller_Stats)data; NavBox.NavAction lookupAction = prodstatsNavBox.Action; switch (lookupAction) { case NavBox.NavAction.BACKANDSUBMIT: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); if (prodstatsNavBox.IsCustom) { string custDet = prodstatsNavBox.CustomDetail; if (custDet.Equals("ProductsAndServices")) { this.nextState = PawnCustInformationFlowState.ViewPawnCustomerProductDetails; } else if (custDet.Equals("Customer")) { if (this.parentFlow.Name.Equals("NewPawnLoanFlowExecutor", StringComparison.OrdinalIgnoreCase)) { this.nextState = PawnCustInformationFlowState.ViewReadOnlyCustomerInformation; } else { this.nextState = PawnCustInformationFlowState.ViewCustomerInformation; } } else if (custDet.Equals("ItemHistory")) { this.nextState = PawnCustInformationFlowState.ItemHistory; } else if (custDet.Equals("ProductHistory")) { this.nextState = PawnCustInformationFlowState.ProductHistory; } } break; case NavBox.NavAction.BACK: if (prodstatsNavBox.IsCustom && prodstatsNavBox.CustomDetail.Equals("Menu", StringComparison.OrdinalIgnoreCase)) { this.nextState = PawnCustInformationFlowState.CancelFlow; } else { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); CommonAppBlocks.Instance.HideFlowTabController(); if (prodstatsNavBox.IsCustom && prodstatsNavBox.CustomDetail.Equals("Close", StringComparison.OrdinalIgnoreCase)) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.None; GlobalDataAccessor.Instance.DesktopSession.DescribeItemPawnItemIndex = -1; this.nextState = PawnCustInformationFlowState.ExitFlow; } else { this.nextState = PawnCustInformationFlowState.CancelFlow; } } break; case NavBox.NavAction.SUBMIT: this.nextState = PawnCustInformationFlowState.CancelFlow; break; default: throw new ApplicationException("" + lookupAction.ToString() + " is not a valid state for Stats"); } this.executeNextState(); }
private void viewCustFormNavAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("View Customer form navigation action handler received invalid data"); } NavBox viewCustNavBox = (NavBox)sender; ViewCustomerInformation viewCustForm = (ViewCustomerInformation)data; NavBox.NavAction action = viewCustNavBox.Action; switch (action) { case NavBox.NavAction.CANCEL: case NavBox.NavAction.BACK: if (viewCustNavBox.IsCustom && viewCustNavBox.CustomDetail.Equals("Menu", StringComparison.OrdinalIgnoreCase)) { this.nextState = PawnCustInformationFlowState.CancelFlow; } else { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); CommonAppBlocks.Instance.HideFlowTabController(); if (viewCustNavBox.IsCustom && viewCustNavBox.CustomDetail.Equals("Newloan", StringComparison.OrdinalIgnoreCase)) { GlobalDataAccessor.Instance.DesktopSession.TabStateClicked = FlowTabController.State.None; } else if (viewCustNavBox.IsCustom && viewCustNavBox.CustomDetail.Equals("Close", StringComparison.OrdinalIgnoreCase)) { this.nextState = PawnCustInformationFlowState.ExitFlow; } else { this.nextState = PawnCustInformationFlowState.CancelFlow; } } break; case NavBox.NavAction.BACKANDSUBMIT: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Desktop(); if (viewCustNavBox.IsCustom) { string custDet = viewCustNavBox.CustomDetail; if (custDet.Equals("Stats") || custDet.Equals("ProductStats")) { this.nextState = PawnCustInformationFlowState.ViewPawnCustomerStats; } else if (custDet.Equals("ProductsAndServices")) { this.nextState = PawnCustInformationFlowState.ViewPawnCustomerProductDetails; } else if (custDet.Equals("ItemHistory")) { this.nextState = PawnCustInformationFlowState.ItemHistory; } else if (custDet.Equals("ProductHistory")) { this.nextState = PawnCustInformationFlowState.ProductHistory; } } break; default: throw new ApplicationException("" + action.ToString() + " is not a valid state for LookupTicket"); } this.executeNextState(); }
private void productServicesFormNavAction(object sender, object data) { if (sender == null || data == null) { throw new ApplicationException("Product Services form navigation action handler received invalid data"); } NavBox prodsrvNavBox = (NavBox)sender; Controller_ProductServices prodSrvForm = (Controller_ProductServices)data; NavBox.NavAction lookupAction = prodsrvNavBox.Action; switch (lookupAction) { case NavBox.NavAction.SUBMIT: if (prodsrvNavBox.IsCustom) { string custDet = prodsrvNavBox.CustomDetail; if (custDet.Equals("LoanService", StringComparison.OrdinalIgnoreCase)) { if (GlobalDataAccessor.Instance.DesktopSession.LockProductsTab) { CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.Customer, false); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.ProductsAndServices, true); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.Stats, false); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.ItemHistory, false); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.ProductHistory, false); } else { CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.Customer, true); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.ProductsAndServices, true); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.Stats, true); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.ItemHistory, true); CommonAppBlocks.Instance.SetFlowTabEnabled(FlowTabController.State.ProductHistory, true); } return; } if (custDet.Equals("Reload", StringComparison.OrdinalIgnoreCase)) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); CommonAppBlocks.Instance.HideFlowTabController(); this.nextState = PawnCustInformationFlowState.ViewPawnCustomerProductDetails; } else if (custDet.Equals("ManagePawnApplication", StringComparison.OrdinalIgnoreCase)) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Trigger = Commons.TriggerTypes.VIEWPAWNCUSTPRODDETAILS; prodSrvForm.Hide(); CommonAppBlocks.Instance.HideFlowTabController(); this.nextState = PawnCustInformationFlowState.ManagePawnApplication; } else if (custDet.Equals("ProcessTender", StringComparison.OrdinalIgnoreCase)) { CommonAppBlocks.Instance.HideFlowTabController(); GlobalDataAccessor.Instance.DesktopSession.HistorySession.Desktop(); this.nextState = PawnCustInformationFlowState.TenderIn; } else { this.nextState = PawnCustInformationFlowState.ViewReceipt; } } else { this.nextState = PawnCustInformationFlowState.CancelFlow; } break; case NavBox.NavAction.BACKANDSUBMIT: GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); if (prodsrvNavBox.IsCustom) { string custDet = prodsrvNavBox.CustomDetail; if (custDet.Equals("ProductStats")) { this.nextState = PawnCustInformationFlowState.ViewPawnCustomerStats; } else if (custDet.Equals("Customer")) { this.nextState = PawnCustInformationFlowState.ViewCustomerInformation; } else if (custDet.Equals("ItemHistory")) { this.nextState = PawnCustInformationFlowState.ItemHistory; } else if (custDet.Equals("ProductHistory")) { this.nextState = PawnCustInformationFlowState.ProductHistory; } } break; case NavBox.NavAction.BACK: if (prodsrvNavBox.IsCustom && prodsrvNavBox.CustomDetail.Equals("Menu", StringComparison.OrdinalIgnoreCase)) { this.nextState = PawnCustInformationFlowState.CancelFlow; } else { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); CommonAppBlocks.Instance.HideFlowTabController(); this.nextState = PawnCustInformationFlowState.ExitFlow; } break; default: throw new ApplicationException("" + lookupAction.ToString() + " is not a valid state for Products and services"); } this.executeNextState(); }
private void transferRejectCommentFormAction(object sender, object data) { NavBox transferRejectCommentNavBox = (NavBox)sender; NavBox.NavAction action = transferRejectCommentNavBox.Action; if (action == NavBox.NavAction.BACKANDSUBMIT) { GlobalDataAccessor.Instance.DesktopSession.HistorySession.Back(); action = NavBox.NavAction.SUBMIT; } var dSession = GlobalDataAccessor.Instance.DesktopSession; switch (action) { case NavBox.NavAction.SUBMIT: //Default happy path next state string errorCode, errorText; bool retValue = TransferProcedures.RejectTransfer(dSession, dSession.ActiveTransferIn, out errorCode, out errorText); if (!retValue) { MessageBox.Show("An error occured while rejecting the transfer."); } this.nextState = TransferInFlowState.ManageTransfer; break; case NavBox.NavAction.CANCEL: this.nextState = TransferInFlowState.CancelFlow; break; default: throw new ApplicationException(string.Format("{0} is not a valid state for SelectTransferInItems", action.ToString())); } this.executeNextState(); }