Exemple #1
0
 public SameDataAgent(
     int nCustomerID,
     long?cashRequestID,
     long?nlCashRequestID,
     decimal nSystemCalculatedAmount,
     AutomationCalculator.Common.Medal nMedal,
     AutomationCalculator.Common.MedalType nMedalType,
     AutomationCalculator.Common.TurnoverType?turnoverType,
     DateTime now,
     AConnection oDB,
     ASafeLog oLog
     ) : base(
         nCustomerID,
         cashRequestID,
         nlCashRequestID,
         nSystemCalculatedAmount,
         nMedal,
         nMedalType,
         turnoverType,
         oDB,
         oLog
         )
 {
     this.now = now;
 }         // constructor
Exemple #2
0
        public Approval(
            int customerId,
            long?cashRequestID,
            long?nlCashRequestID,
            int offeredCreditLine,
            Medal medalClassification,
            AutomationCalculator.Common.MedalType medalType,
            AutomationCalculator.Common.TurnoverType?turnoverType,
            string tag,
            AConnection db,
            ASafeLog log
            )
        {
            this.incorporationDate = null;

            this.trail = new ApprovalTrail(
                customerId,
                cashRequestID,
                nlCashRequestID,
                this.log,
                CurrentValues.Instance.AutomationExplanationMailReciever,
                CurrentValues.Instance.MailSenderEmail,
                CurrentValues.Instance.MailSenderName)
            {
                Amount = offeredCreditLine,
            };

            using (this.trail.AddCheckpoint(ProcessCheckpoints.Creation)) {
                this.trail.SetTag(tag);

                Now = DateTime.UtcNow;

                this.db  = db;
                this.log = log.Safe();

                this.loanRepository = ObjectFactory.GetInstance <LoanRepository>();
                var customerRepo = ObjectFactory.GetInstance <CustomerRepository>();
                this.cashRequestsRepository            = ObjectFactory.GetInstance <CashRequestsRepository>();
                this.loanScheduleTransactionRepository = ObjectFactory.GetInstance <LoanScheduleTransactionRepository>();

                this.medalClassification = medalClassification;
                this.medalType           = medalType;
                this.turnoverType        = turnoverType;

                this.customer = customerRepo.ReallyTryGet(customerId);

                this.turnover = new AutoApprovalTurnover {
                    TurnoverType = this.turnoverType,
                };
                this.turnover.Init();
            }             // using timer step

            this.m_oSecondaryImplementation = new Agent(
                this.trail.CustomerID,
                this.trail.CashRequestID,
                this.trail.NLCashRequestID,
                offeredCreditLine,
                (AutomationCalculator.Common.Medal)medalClassification,
                medalType,
                turnoverType,
                db,
                log
                );
        }         // constructor