Exemple #1
0
        public Staller(int customerId, StrategiesMailer mailer)
        {
            this.marketplaceUpdateStatus = null;

            this.customerID = customerId;
            this.mailer     = mailer;

            this.totalTimeToWaitForMarketplacesUpdate = CurrentValues.Instance.TotalTimeToWaitForMarketplacesUpdate;
            this.intervalWaitForMarketplacesUpdate    = CurrentValues.Instance.IntervalWaitForMarketplacesUpdate;

            this.totalTimeToWaitForExperianCompanyCheck = CurrentValues.Instance.TotalTimeToWaitForExperianCompanyCheck;
            this.intervalWaitForExperianCompanyCheck    = CurrentValues.Instance.IntervalWaitForExperianCompanyCheck;

            this.totalTimeToWaitForExperianConsumerCheck = CurrentValues.Instance.TotalTimeToWaitForExperianConsumerCheck;
            this.intervalWaitForExperianConsumerCheck    = CurrentValues.Instance.IntervalWaitForExperianConsumerCheck;

            this.totalTimeToWaitForAmlCheck = CurrentValues.Instance.TotalTimeToWaitForAmlCheck;
            this.intervalWaitForAmlCheck    = CurrentValues.Instance.IntervalWaitForAmlCheck;

            SafeReader sr = DB.GetFirst(
                "GetMainStrategyStallerData",
                CommandSpecies.StoredProcedure,
                new QueryParameter("CustomerId", this.customerID)
                );

            if (!sr.IsEmpty)
            {
                string experianRefNum = sr["ExperianRefNum"];

                this.hasCompany = !string.IsNullOrEmpty(experianRefNum);
                this.wasMainStrategyExecutedBefore = sr["MainStrategyExecutedBefore"];
                this.typeOfBusiness = sr["TypeOfBusiness"];
                this.customerEmail  = sr["CustomerEmail"];
            }     // if
        }         // constructor
 public DispatchNotifications(
     string outerContextDescription,
     bool isSilentlyApproved,
     StrategiesMailer mailer,
     MedalResult medal,
     CustomerDetails customerDetails,
     AutoDecisionResponse autoDecisionResponse,
     OfferResult offerResult,
     Guid?approvalTrailUniqueID,
     string silentEmailRecipient,
     string silentEmailSenderName,
     string silentEmailSenderAddress
     ) : base(outerContextDescription)
 {
     this.isSilentlyApproved = isSilentlyApproved;
     this.mailer             = mailer;
     this.medal                    = medal;
     this.customerDetails          = customerDetails;
     this.autoDecisionResponse     = autoDecisionResponse;
     this.offerResult              = offerResult;
     this.approvalTrailUniqueID    = approvalTrailUniqueID;
     this.silentEmailRecipient     = silentEmailRecipient;
     this.silentEmailSenderName    = silentEmailSenderName;
     this.silentEmailSenderAddress = silentEmailSenderAddress;
 }         // constructor
Exemple #3
0
        public CaisGenerate(int underwriterId)
        {
            mailer = new StrategiesMailer();

            SafeReader sr = DB.GetFirst("GetCaisFoldersPaths", CommandSpecies.StoredProcedure);

            caisPath           = sr["CaisPath"];
            caisPath2          = sr["CaisPath2"];
            this.underwriterId = underwriterId;
            this.caisReportsHistoryRepository = ObjectFactory.GetInstance <CaisReportsHistoryRepository>();
            service = new ExperianLib.Ebusiness.EBusinessService(DB);
        }
Exemple #4
0
 public UpdateData(
     string outerContextDescription,
     int customerID,
     int marketplaceUpdateValidityDays,
     StrategiesMailer mailer,
     bool logicalGlueEnabled,
     int monthlyPayment
     ) : base(outerContextDescription)
 {
     this.customerID = customerID;
     this.marketplaceUpdateValidityDays = marketplaceUpdateValidityDays;
     this.mailer             = mailer;
     this.logicalGlueEnabled = logicalGlueEnabled;
     this.monthlyPayment     = monthlyPayment;
 }         // constructor
Exemple #5
0
 public ExternalNotifier(
     StrategiesMailer mailer,
     int customerId,
     MedalResult medal,
     CustomerDetails customerDetails,
     AutoDecisionResponse autoDecisionResponse,
     bool sendToCustomer,
     ASafeLog log
     )
 {
     this.mailer               = mailer;
     this.customerId           = customerId;
     this.medal                = medal;
     this.customerDetails      = customerDetails;
     this.autoDecisionResponse = autoDecisionResponse;
     this.sendToCustomer       = sendToCustomer;
     this.log = log.Safe();
 }         // constructor
Exemple #6
0
        }        //Execute

        private void SendFundsUtilized()
        {
            if (!this.systemBalance.NewBalance.HasValue)
            {
                return;
            }            //if

            var contacts = DB.Fill <I_InvestorContact>(string.Format("SELECT * FROM I_InvestorContact WHERE InvestorID = {0} AND IsActive = 1",
                                                                     this.investorID),
                                                       CommandSpecies.Text);


            foreach (var investorContact in contacts)
            {
                StrategiesMailer mailer = new StrategiesMailer();

                Dictionary <string, string> parameters = new Dictionary <string, string> {
                    { "ContactFirstName", investorContact.PersonalName },
                    { "ContactLastName", investorContact.LastName },
                    { "InvestorName", this.investor.Name },
                    { "CurrentBalace", this.systemBalance.NewBalance.Value.ToString("#,#") },
                    { "CurrentBalaceDate", this.systemBalance.Timestamp.ToString("dd/MM/yy hh:mm") },
                    { "BankAccountName", this.fundingBankAccount.BankAccountName },
                    { "BankAccountNumber", this.fundingBankAccount.BankAccountNumber },
                };
                Log.Info("NotifyInvestorUtilizedFunds sending funds utilized notification to investor {0} contact {1} {2}", this.investorID, investorContact.InvestorContactID, investorContact.Email);
                mailer.Send("InvestorFundsNotification",
                            parameters,
                            new Addressee(
                                investorContact.Email,
                                bShouldRegister: true,
                                userID: investorContact.InvestorContactID,
                                addSalesforceActivity: false)
                            );
            }    //foreach
        }        //SendFundsUtilized