コード例 #1
0
ファイル: SilentAutomation.cs プロジェクト: vijayamazon/ezbob
        }         // LoadMainStrategyExecutedBefore

        private int CapOffer(MedalResult medal)
        {
            Log.Info("Finalizing and capping offer");

            int offeredCreditLine = medal.RoundOfferedAmount();

            bool isHomeOwnerAccordingToLandRegistry = DB.ExecuteScalar <bool>(
                "GetIsCustomerHomeOwnerAccordingToLandRegistry",
                CommandSpecies.StoredProcedure,
                new QueryParameter("CustomerId", this.customerID)
                );

            if (isHomeOwnerAccordingToLandRegistry)
            {
                Log.Info("Capped for home owner according to land registry");
                offeredCreditLine = Math.Min(offeredCreditLine, MaxCapHomeOwner);
            }
            else
            {
                Log.Info("Capped for not home owner");
                offeredCreditLine = Math.Min(offeredCreditLine, MaxCapNotHomeOwner);
            }             // if

            return(offeredCreditLine);
        }         // CapOffer
コード例 #2
0
        }         // SetAdditionalCustomerData

        protected ABackdoorSimpleDetails(
            int homeOwnerCap,
            int notHomeOwnerCap,
            int customerID,
            DecisionActions decision,
            int delay,
            bool ownsProperty,
            decimal requestedAmount,
            bool gradeMode = false
            )
        {
            this.customerID      = customerID;
            Decision             = decision;
            Delay                = delay;
            this.ownsProperty    = ownsProperty;
            this.homeOwnerCap    = homeOwnerCap;
            this.notHomeOwnerCap = notHomeOwnerCap;

            Medal       = null;
            OfferResult = null;

            int appAmount = (int)(requestedAmount / 1000m);

            ApprovedAmount = MedalResult.RoundOfferedAmount(gradeMode ? appAmount * 1000 : Cap(appAmount * 1000));
        }         // constructor