Beispiel #1
0
        private BaseCreditPlanBusinessLogicEntity MapCreditPlanLogicEntityFromLoanProduct(
            int monthes,
            decimal amount,
            int percents,
            LoanProductType type)
        {
            switch (type)
            {
            case LoanProductType.Anuitet:
            {
                return(new AnuitetCreditPlanBusinessLogicEntity(
                           monthes,
                           amount,
                           percents));
            }

            case LoanProductType.Differential:
            {
                return(new DifferentialCreditPlanBusinessLogicEntity
                    {
                        CreditPeriodInMonths = monthes,
                        CreditSum = amount,
                        Percents = percents
                    });
            }

            case LoanProductType.OneTimePayment:
            {
                return(new OneTimePaymentCreditPlanBusinessLogicEntity
                    {
                        CreditPeriodInMonths = monthes,
                        CreditSum = amount,
                        Percents = percents
                    });
            }

            default:
            {
                throw new NotImplementedException();
            }
            }
        }
 private BaseCreditPlanBusinessLogicEntity MapCreditPlanLogicEntityFromLoanProduct(
     int monthes,
     decimal amount,
     int percents,
     LoanProductType type)
 {
     switch (type)
     {
         case LoanProductType.Anuitet:
             {
                 return new AnuitetCreditPlanBusinessLogicEntity(
                     monthes,
                     amount,
                     percents);
             }
         case LoanProductType.Differential:
             {
                 return new DifferentialCreditPlanBusinessLogicEntity
                            {
                                CreditPeriodInMonths = monthes,
                                CreditSum = amount,
                                Percents = percents
                            };
             }
         case LoanProductType.OneTimePayment:
             {
                 return new OneTimePaymentCreditPlanBusinessLogicEntity
                            {
                                CreditPeriodInMonths = monthes,
                                CreditSum = amount,
                                Percents = percents
                            };
             }
         default:
             {
                 throw new NotImplementedException();
             }
     }
 }
Beispiel #3
0
 public void Update(LoanProduct product)
 {
     this.IsDeleted = product.IsDeleted;
     this.MinAmount = product.MinAmount;
     this.Percentage = product.Percentage;
     this.MinPeriodInMonth = product.MinPeriodInMonth;
     this.MaxPeriodInMonth = product.MaxPeriodInMonth;
     this.Name = product.Name;
     this.Description = product.Description;
     this.Type = product.Type;
     this.Status = product.Status;
     this.Requirements.Update(product.Requirements);
     this.FineDayPercentage = product.FineDayPercentage;
     this.AdvancedRepaymentFirstPossibleMonth = product.AdvancedRepaymentFirstPossibleMonth;
     this.AdvancedRepaymentFinePercentage = product.AdvancedRepaymentFinePercentage;
 }