Beispiel #1
0
        protected override void ExecuteStep()
        {
            DateTime now = DateTime.UtcNow;

            var sp = new GetCustomerCompanyID(DB, Log)
            {
                CustomerID = this.customerID,
                Now        = now,
            };

            sp.ExecuteNonQuery();

            CompanyID = sp.CompanyID;

            TypeOfBusiness tob;

            TypeOfBusiness = Enum.TryParse(sp.TypeOfBusiness, true, out tob) ? tob : TypeOfBusiness.Entrepreneur;

            MonthlyRepayment = InjectorStub.GetEngine().GetMonthlyRepaymentData(this.customerID, now);

            Log.Debug(
                "Customer {0} at {1}: company ID is {2}, monthly repayment is {3} (requested {4} for {5}).",
                this.customerID,
                now.MomentStr(),
                CompanyID,
                MonthlyRepayment.MonthlyPayment.ToString("C0"),
                MonthlyRepayment.RequestedAmount.ToString("C0"),
                Grammar.Number(MonthlyRepayment.RequestedTerm, "month")
                );
        }         // ExecuteStep
Beispiel #2
0
        protected virtual void LoadCompanyAndMonthlyPayment(DateTime now)
        {
            var sp = new GetCustomerCompanyID(DB, Log)
            {
                CustomerID = CustomerID,
                Now        = now,
            };

            sp.ExecuteNonQuery();

            CompanyID = sp.CompanyID;

            MonthlyRepayment = InjectorStub.GetEngine().GetMonthlyRepaymentData(CustomerID, now);

            Log.Debug(
                "Customer {0} at {1}: company ID is {2}, monthly repayment is {3} (requested {4} for {5}).",
                CustomerID,
                now.MomentStr(),
                CompanyID,
                MonthlyRepayment.MonthlyPayment.ToString("C0"),
                MonthlyRepayment.RequestedAmount.ToString("C0"),
                Grammar.Number(MonthlyRepayment.RequestedTerm, "month")
                );
        }         // LoadCompanyAndMonthlyPayment