public double CalculateOtherRisksAndBonuses(NumberOfPayments numberOfPayments, double tariffNumber, Models.Models.InsurerRiskOrBonus irb,
                                                    RiskOrBonus currentRisk, Region region)
        {
            switch (currentRisk.Nomenclature)
            {
            case "One time payment":
                if (numberOfPayments == NumberOfPayments.One)
                {
                    tariffNumber += irb.TariffNumberChange;
                }
                break;

            case "Car is registered in Sofia":
                if (region.Name == "Sofia")
                {
                    tariffNumber += irb.TariffNumberChange;
                }
                break;
            }

            return(tariffNumber);
        }
Exemplo n.º 2
0
 public CalculateTariffNumberFacade(CalculateMVRelatedRisksSubSystem mvRelatedRisks,
                                    CalculateOwnerRelatedRisksSubSystem ownerRelatedRisks,
                                    CalculateOtherRisksSubSystem otherRisks,
                                    ApplicationDbContext db,
                                    double tariffNumber,
                                    List <InsurerRiskOrBonus> insurerRisksOrBonuses,
                                    InfoForInsurance info,
                                    Insurer insurer,
                                    CarModel carModel,
                                    Region region,
                                    NumberOfPayments numberOfPayments)
 {
     this.mvRelatedRisks    = mvRelatedRisks;
     this.ownerRelatedRisks = ownerRelatedRisks;
     this.otherRisks        = otherRisks;
     this.db                    = db;
     this.tariffNumber          = tariffNumber;
     this.insurerRisksOrBonuses = insurerRisksOrBonuses;
     this.info                  = info;
     this.insurer               = insurer;
     this.carModel              = carModel;
     this.region                = region;
     this.numberOfPayments      = numberOfPayments;
 }