Exemplo n.º 1
0
        }         // enum RowType

        private void GatherData()
        {
            Cfg.Load();

            LoadData();

            Trail.MyInputData.InitCfg(@Now, Cfg.Values);

            OriginationTime.FromExperian(MetaData.IncorporationDate);

            FillFromConsumerData();
            FillFromCompanyData();

            Trail.MyInputData.InitData(ToInputData());
        }         // GatherData
Exemplo n.º 2
0
        protected virtual void GatherData()
        {
            Cfg.Load();

            DB.ForEachRowSafe(
                ProcessRow,
                "LoadAutoRerejectData",
                CommandSpecies.StoredProcedure,
                new QueryParameter("CustomerID", Args.CustomerID),
                new QueryParameter("Now", Args.DataAsOf)
                );

            MetaData.Validate();

            Trail.MyInputData.Init(Args, Cfg, MetaData, NewMarketplaces);
        }         // GatherData
Exemplo n.º 3
0
        protected virtual void GatherData()
        {
            Cfg.Load();

            DB.ForEachRowSafe(
                ProcessRow,
                "LoadAutoReapprovalData",
                CommandSpecies.StoredProcedure,
                new QueryParameter("CustomerID", Args.CustomerID),
                new QueryParameter("Now", Now)
                );

            GatherAvailableFunds();

            MetaData.Validate();

            Trail.MyInputData.Init(Now, null);
            Trail.MyInputData.ReApproveAmount     = MetaData.ApprovedAmount;
            Trail.MyInputData.FraudStatus         = MetaData.FraudStatus;
            Trail.MyInputData.ManualApproveDate   = MetaData.LacrTime;
            Trail.MyInputData.WasLate             = MetaData.LateLoanCount > 0;
            Trail.MyInputData.WasRejected         = MetaData.RejectAfterLacrID > 0;
            Trail.MyInputData.NumOutstandingLoans = MetaData.OpenLoanCount;
            Trail.MyInputData.HasLoanCharges      = MetaData.SumOfCharges > 0.00000001m;
            Trail.MyInputData.LacrID = MetaData.LacrID;

            Trail.MyInputData.MaxLateDays                           = LatePayments.Count < 1 ? 0 : LatePayments.Select(lp => lp.Delay).Max();
            Trail.MyInputData.NewDataSourceAdded                    = NewMarketplaces.Count > 0;
            Trail.MyInputData.AvaliableFunds                        = Funds.Available - Funds.Reserved;
            Trail.MyInputData.AutoReApproveMaxLacrAge               = Cfg.MaxLacrAge;
            Trail.MyInputData.AutoReApproveMaxLatePayment           = Cfg.MaxLatePayment;
            Trail.MyInputData.AutoReApproveMaxNumOfOutstandingLoans = Cfg.MaxNumOfOutstandingLoans;
            Trail.MyInputData.MinLoan = ConfigManager.CurrentValues.Instance.MinLoan;

            Output = new AutoReapprovalOutput {
                AppValidFor               = Now.AddHours(MetaData.OfferLength),
                IsEmailSendingBanned      = MetaData.IsEmailSendingBanned,
                LastApprovedCashRequestID = MetaData.LacrID,
            };
        }         // GatherData
Exemplo n.º 4
0
        }         // GatherAvailableFunds

        /// <summary>
        /// Collects customer data from DB. Can be overridden to provide
        /// specific customer data instead of the current one.
        /// </summary>
        protected virtual void GatherData()
        {
            this.caisAccounts.Clear();

            Cfg.Load();

            DB.ForEachRowSafe(
                ProcessRow,
                "LoadAutoApprovalData",
                CommandSpecies.StoredProcedure,
                new QueryParameter("CustomerID", Args.CustomerID),
                new QueryParameter("Now", Now)
                );

            MetaData.NumOfDefaultAccounts = ExperianConsumerDataExt.FindNumOfPersonalDefaults(
                this.caisAccounts,
                Cfg.Reject_Defaults_Amount,
                Now.AddMonths(-1 * Cfg.Reject_Defaults_MonthsNum)
                );

            OriginationTime.FromExperian(MetaData.IncorporationDate);

            GatherAvailableFunds();

            Trail.MyInputData.FullInit(
                Now,
                Cfg,
                Args,
                MetaData,
                Payments,
                OriginationTime,
                Turnover,
                Funds,
                DirectorNames,
                HmrcBusinessNames
                );

            MetaData.Validate();
        }         // GatherData