コード例 #1
0
        public ShowForm DescribeMerchChargeOnBlock(
            Form parentForm,
            NavBox.NavBoxActionFired fxn, DesktopSession desktopSession)
        {
            var descMerchFrm = new DescribeMerchandise(desktopSession, CurrentContext.AUDITCHARGEON);

            return(this.createShowFormBlock(
                       ValidFormBlockTypes.None,
                       parentForm,
                       descMerchFrm,
                       descMerchFrm.NavControlBox,
                       fxn, true));
        }
コード例 #2
0
        /// <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();
        }