コード例 #1
0
    private static void DisplayLoanSpecificInfo_FlatFormat(LoanProviderInfo loanSpecificInfo)
    {
        string output;

        output = String.Format("{0,-20}{1,-5}{2,-13:C}{3,-11:C}{4,-15:C}{5,-15:C}{6,-10}{7,-10}{8,-10}{9,-15}{10,-20:C}{11,-15}{12,-15:C}{13,-15}{14,-25:C}{15,-15:C}{16,-15:C}",
                               loanSpecificInfo.LoanType,
                               loanSpecificInfo.LoanTermYears,
                               loanSpecificInfo.HouseAmount_Actual,
                               loanSpecificInfo.Payment_Maximum,
                               loanSpecificInfo.LoanAmount_Base,
                               loanSpecificInfo.LoanAmount_Actual,
                               loanSpecificInfo.InterestRate_Annual_Base,
                               loanSpecificInfo.InterestRate_Annual_Offset,
                               loanSpecificInfo.InterestRate_Annual_Total,
                               loanSpecificInfo.UpfrontMortgageInsuranceRate,
                               loanSpecificInfo.UpfrontMortgageInsurancePayment,
                               loanSpecificInfo.MonthlyMortgageInsuranceRate,
                               loanSpecificInfo.MonthlyMortgageInsurancePayment,
                               loanSpecificInfo.MonthlyPropertyTaxRate,
                               loanSpecificInfo.MonthlyPropertyTaxPayment,
                               loanSpecificInfo.PrincipleAndInterestPayment,
                               loanSpecificInfo.TotalLoanPayment);
        Console.WriteLine(output);

        //Console.WriteLine();
    }
コード例 #2
0
    /// <summary>
    /// CLIENT SPECIFIC DISPLAY METHOD - Do not change
    /// </summary>
    static private string DisplayLoanSpecificInfo(LoanProviderInfo loanSpecificInfo)
    {
        string returnLI = string.Empty;

        try
        {
            returnLI += "<tr><td colspan=2>" + String.Format("<h5>{0}</h5>", loanSpecificInfo.LoanType) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Loan Term:</td><td> {0} years ({1} months)", loanSpecificInfo.LoanTermYears, loanSpecificInfo.LoanTermMonths) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Max Loan Amount qualified for - Base:</td><td> {0:C}", loanSpecificInfo.LoanAmount_Base) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Loan Amount - including upfront Mortgage Insurance:</td><td> {0:C}", loanSpecificInfo.LoanAmount_Actual) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Annual Interest Rate BASE:</td><td> {0}%", loanSpecificInfo.InterestRate_Annual_Base) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Annual Interest Rate OFFSET:</td><td> {0}%", loanSpecificInfo.InterestRate_Annual_Offset) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Annual Interest Rate TOTAL:</td><td> {0}%", loanSpecificInfo.InterestRate_Annual_Total) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Upfront Mortgage Insurance Rate:</td><td> {0}%", loanSpecificInfo.UpfrontMortgageInsuranceRate) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Upfront Mortgage Insurance Amount:</td><td> {0:C}", loanSpecificInfo.UpfrontMortgageInsurancePayment) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Monthly Mortgage Insurance Rate:</td><td> {0}%", loanSpecificInfo.MonthlyMortgageInsuranceRate) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Monthly Mortgage Insurance Payment:</td><td> {0:C}", loanSpecificInfo.MonthlyMortgageInsurancePayment) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Monthly Property Tax Rate:</td><td> {0}%", loanSpecificInfo.MonthlyPropertyTaxRate) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Monthly Property Tax Payment:</td><td> {0:C}", loanSpecificInfo.MonthlyPropertyTaxPayment) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Monthly P&I:</td><td> {0:C}", loanSpecificInfo.PrincipleAndInterestPayment) + "</td></tr>";
            returnLI += "<tr><td>" + String.Format("Total Payment (P&I + Insurance):</td><td> {0:C}", loanSpecificInfo.TotalLoanPayment) + "</td></tr>";
        }
        catch (Exception ex)
        {
            returnLI += "Errored Out:" + ex.Message;
        }
        return(returnLI);
    }
コード例 #3
0
    /// <summary>
    /// Now that we have the info for the most money that can be borrowed, update the loan object with that "max" info.
    /// Then compute the payments based on the rates for various items.
    /// </summary>
    private static void UpdateLoanInfo(LoanProviderInfo masterLoanSpecificInfo, LoanCalculationResults theCalculationResults, decimal downPaymentPercentage)
    {
        masterLoanSpecificInfo.LoanAmount_Base             = theCalculationResults.RecommendedLoanAmount_Base;
        masterLoanSpecificInfo.PrincipleAndInterestPayment = theCalculationResults.RecommendedPayment_PrincipleAndInterest;

        //if (masterLoanSpecificInfo.GetType.Equals("USDA 30-year Loan", StringComparison.OrdinalIgnoreCase) = true)
        masterLoanSpecificInfo.UpfrontMortgageInsurancePayment = (decimal)((masterLoanSpecificInfo.UpfrontMortgageInsuranceRate / 100) * (double)masterLoanSpecificInfo.LoanAmount_Base);

        decimal annualMortgageInsurancePayment = (decimal)((masterLoanSpecificInfo.MonthlyMortgageInsuranceRate / 100) * (double)(masterLoanSpecificInfo.LoanAmount_Base + masterLoanSpecificInfo.UpfrontMortgageInsurancePayment));

        masterLoanSpecificInfo.MonthlyMortgageInsurancePayment = annualMortgageInsurancePayment / 12;

        decimal annualPropertyTaxPayment = (decimal)((masterLoanSpecificInfo.MonthlyPropertyTaxRate / 100) * (double)(masterLoanSpecificInfo.LoanAmount_Base + masterLoanSpecificInfo.UpfrontMortgageInsurancePayment));

        masterLoanSpecificInfo.MonthlyPropertyTaxPayment = annualPropertyTaxPayment / 12;

        // Add all the new payments into the loan amount.
        masterLoanSpecificInfo.LoanAmount_Actual = masterLoanSpecificInfo.LoanAmount_Base + masterLoanSpecificInfo.UpfrontMortgageInsurancePayment;
        masterLoanSpecificInfo.TotalLoanPayment  = masterLoanSpecificInfo.PrincipleAndInterestPayment + masterLoanSpecificInfo.MonthlyMortgageInsurancePayment + masterLoanSpecificInfo.MonthlyPropertyTaxPayment;

        int    salesPriceIndex     = masterLoanSpecificInfo.getRowForTableLookups(downPaymentPercentage);
        double downPaymentModifier = SalesPriceCalculationData.SalesPriceCalculation[salesPriceIndex];

        masterLoanSpecificInfo.HouseAmount_Actual = (decimal)((double)masterLoanSpecificInfo.LoanAmount_Actual / downPaymentModifier);
    }
コード例 #4
0
    /// <summary>
    /// Find how much the user can borrow for this loan type.
    /// </summary>
    public static void FindBestLoanAmount(LoanProviderInfo loanProviderInfo, int maxPayment, decimal downPaymentPercentage)
    {
        LoanCalculationResults calculationResult = new LoanCalculationResults();

        calculationResult = FindBestLoanBasedOnMonthlyPayment(maxPayment, loanProviderInfo.LoanTermMonths, loanProviderInfo.InterestRate_Annual_Total, loanProviderInfo.UpfrontMortgageInsuranceRate, loanProviderInfo.MonthlyMortgageInsuranceRate, loanProviderInfo.MonthlyPropertyTaxRate);
        UpdateLoanInfo(loanProviderInfo, calculationResult, downPaymentPercentage);
    }
コード例 #5
0
    /// <summary>
    /// Setup Loan-specific information for USDA loans.
    ///
    /// </summary>
    static public void setupLoanInfoUSDA(LoanProviderInfo loanProviderInfo, int creditScore, decimal downPaymentPercentage, double[,] interestRateOffsetByCreditScoreAndDownPayment, double[,] upfrontMortgageInterestRates, double[,] monthlyMortgageInterestRates)
    {
        loanProviderInfo.CreditScore = creditScore;

        // Interest rate and offset (add the two for actual interest rate)
        //            loanProviderInfo.InterestRate_Annual_Base = annualInterestRate_Base;
        loanProviderInfo.InterestRate_Annual_Offset = loanProviderInfo.Lookup_InterestRateOffset(creditScore, downPaymentPercentage, interestRateOffsetByCreditScoreAndDownPayment);
        if (loanProviderInfo.InterestRate_Annual_Offset == CSTL)
        {
            throw new IndexOutOfRangeException("Credit Score too low for this loan (" + loanProviderInfo.LoanType + ") - Interest rate offset not found.");
        }

        // Upfront Mortgage Insurance
        loanProviderInfo.UpfrontMortgageInsuranceRate = loanProviderInfo.Lookup_UpfrontMortgageInsuranceRate(creditScore, downPaymentPercentage, upfrontMortgageInterestRates);
        if (loanProviderInfo.UpfrontMortgageInsuranceRate == CSTL)
        {
            throw new IndexOutOfRangeException("Credit Score too low for this loan (" + loanProviderInfo.LoanType + ") - Upfront Mortgage Insurance rate not found.");
        }

        // Monthly Mortgage Insurance
        loanProviderInfo.MonthlyMortgageInsuranceRate = loanProviderInfo.Lookup_MonthlyMortgageInsuranceRate(creditScore, downPaymentPercentage, monthlyMortgageInterestRates);
        if (loanProviderInfo.MonthlyMortgageInsuranceRate == CSTL)
        {
            throw new IndexOutOfRangeException("Credit Score too low for this loan (" + loanProviderInfo.LoanType + ") - Monthly Mortgage Insurance rate not found.");
        }

        // Property tax
        loanProviderInfo.MonthlyPropertyTaxRate = loanProviderInfo.Lookup_MonthlyPropertyTaxRate();
    }
コード例 #6
0
 /// <summary>
 /// This is a test method that was initially used to pump test cases directly through the Loan Calculator logic.
 /// This method isn't really used anymore, but is here, just in case!
 /// </summary>
 public static void TestLoanCalculator()
 {
     //public static decimal CalculatePrincipleAndInterestPayment(decimal loanAmount, double loanTermMonths, double interestRate)
     Console.WriteLine("$145,000, 360 months, 3.63%: {0:C}", LoanProviderInfo.CalculatePrincipleAndInterestPayment(145000, 360, 3.63));
     Console.WriteLine("$150,000, 360 months, 3.63%: {0:C}", LoanProviderInfo.CalculatePrincipleAndInterestPayment(150000, 360, 3.63));
     Console.WriteLine("$155,000, 360 months, 3.63%: {0:C}", LoanProviderInfo.CalculatePrincipleAndInterestPayment(155000, 360, 3.63));
     Console.WriteLine("");
 }
コード例 #7
0
 private static void DisplayLoanSpecificInfo(LoanProviderInfo loanSpecificInfo, int dummyVariableToDistinguishMethodSignature)
 {
     Console.WriteLine("Loan Type: {0}", loanSpecificInfo.LoanType);
     Console.WriteLine("Loan Term: {0} years ({1} months)", loanSpecificInfo.LoanTermYears, loanSpecificInfo.LoanTermMonths);
     Console.WriteLine("Max Loan Amount qualified for - Base: {0:C}", loanSpecificInfo.LoanAmount_Base);
     Console.WriteLine("Loan Amount - including upfront Mortgage Insurance: {0:C}", loanSpecificInfo.LoanAmount_Actual);
     Console.WriteLine("Annual Interest Rate BASE: {0}%", loanSpecificInfo.InterestRate_Annual_Base);
     Console.WriteLine("Annual Interest Rate OFFSET: {0}%", loanSpecificInfo.InterestRate_Annual_Offset);
     Console.WriteLine("Annual Interest Rate TOTAL: {0}%", loanSpecificInfo.InterestRate_Annual_Total);
     Console.WriteLine("Upfront Mortgage Insurance Rate: {0}%", loanSpecificInfo.UpfrontMortgageInsuranceRate);
     Console.WriteLine("Upfront Mortgage Insurance Amount: {0:C}", loanSpecificInfo.UpfrontMortgageInsurancePayment);
     Console.WriteLine("Monthly Mortgage Insurance Rate: {0}%", loanSpecificInfo.MonthlyMortgageInsuranceRate);
     Console.WriteLine("Monthly Mortgage Insurance Payment: {0:C}", loanSpecificInfo.MonthlyMortgageInsurancePayment);
     Console.WriteLine("Monthly Property Tax Rate: {0}%", loanSpecificInfo.MonthlyPropertyTaxRate);
     Console.WriteLine("Monthly Property Tax Payment: {0:C}", loanSpecificInfo.MonthlyPropertyTaxPayment);
     Console.WriteLine("Monthly P&I: {0:C}", loanSpecificInfo.PrincipleAndInterestPayment);
     Console.WriteLine("Total Payment (P&I + Insurance): {0:C}", loanSpecificInfo.TotalLoanPayment);
     Console.WriteLine();
 }
コード例 #8
0
    // Al notified me that the max payment is now loan specific.   Now this logic is moved out of the common area.
    /// <summary>
    /// The Max Payment is based on monthly income vs. monthly debt.
    /// The allowed debt ratio is loan specific (the debt ratio tables that are passed in).
    ///   "This is the max you can afford on a loan"
    /// </summary>
    public int calculateMaxPayment(LoanCommonInfo loanCommonInfo, LoanProviderInfo loanProviderInfo, double[,] debtRatioTable_House, double[,] debtRatioTable_Total)
    {
        int maxPayment = 0;

        setupLookupTableIndices(loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage);

        double debtRatio_IncomeBased = debtRatioTable_House[MortgageInsuranceColumnIndex, MortgageInsuranceRowIndex];
        double debtRatio_DebtBased   = debtRatioTable_Total[MortgageInsuranceColumnIndex, MortgageInsuranceRowIndex];

        int maxPaymentAllowedBasedOnIncome = (int)(loanCommonInfo.Income_Monthly * debtRatio_IncomeBased);
        int maxPaymentAllowedBasedOnDebt   = (int)(loanCommonInfo.Income_Monthly * debtRatio_DebtBased) - loanCommonInfo.Debt_Monthly;


        if (maxPaymentAllowedBasedOnIncome > maxPaymentAllowedBasedOnDebt)
        {
            maxPayment = maxPaymentAllowedBasedOnDebt;
        }
        else
        {
            maxPayment = maxPaymentAllowedBasedOnIncome;
        }

        return(maxPayment);
    }
コード例 #9
0
    /// <summary>
    /// This is a good entry point for a client.
    /// Wrapper around entry APIs.
    /// Required (from client): Down Payment (as a decimal percentage), Monthly Income, Monthly Debt, Credit Score).
    /// </summary>
    public static LoanCommonInfo RunQualifier(decimal downPaymentPercentage, int monthlyIncome, int monthlyDebt, int creditScore, int hoaFees)
    {
        Qualifier      qualifier      = new Qualifier();
        LoanCommonInfo loanCommonInfo = new LoanCommonInfo();

        Qualifier.setupBorrowerInitialData(loanCommonInfo, downPaymentPercentage, monthlyIncome, monthlyDebt, creditScore, hoaFees, 9999);

        Console.WriteLine("<RunQualifier> *****************************************************************************************");

        try
        {
            // FHA 30-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_FHA30, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_FHA30, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_FHA30, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_FHA30);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_FHA30, loanCommonInfo.LoanInfo_FHA30.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan - Credit Score: " + loanCommonInfo.CreditScore);
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            // FHA 15-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_FHA15, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_FHA15, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_FHA15, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_FHA15);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_FHA15, loanCommonInfo.LoanInfo_FHA15.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            // VA 30-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_VA30, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_VA30, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_VA30, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_VA30);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_VA30, loanCommonInfo.LoanInfo_VA30.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            // VA 15-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_VA15, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_VA15, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_VA15, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_VA15);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_VA15, loanCommonInfo.LoanInfo_VA15.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            // USDA 30-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_USDA30, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_USDA30, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_USDA30, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_USDA30);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_USDA30, loanCommonInfo.LoanInfo_USDA30.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            // CONV 30-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_CONV30, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_CONV30, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_CONV30, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_CONV30);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_CONV30, loanCommonInfo.LoanInfo_CONV30.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            // CONV 15-Year
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_CONV15, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_CONV15, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_CONV15, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_CONV15);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_CONV15, loanCommonInfo.LoanInfo_CONV15.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _FHA25
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_FHA25, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_FHA25, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_FHA25, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_FHA25);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_FHA25, loanCommonInfo.LoanInfo_FHA25.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _FHA20
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_FHA20, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_FHA20, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_FHA20, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_FHA20);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_FHA20, loanCommonInfo.LoanInfo_FHA20.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _FHA10
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_FHA10, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_FHA10, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_FHA10, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_FHA10);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_FHA10, loanCommonInfo.LoanInfo_FHA10.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }
        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _VA25
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_VA25, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_VA25, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_VA25, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_VA25);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_VA25, loanCommonInfo.LoanInfo_VA25.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }
        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _VA20
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_VA20, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_VA20, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_VA20, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_VA20);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_VA20, loanCommonInfo.LoanInfo_VA20.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }
        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _VA10
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_VA10, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_VA10, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_VA10, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_VA10);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_VA10, loanCommonInfo.LoanInfo_VA10.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }
        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _CONV25
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_CONV25, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_CONV25, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_CONV25, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_CONV25);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_CONV25, loanCommonInfo.LoanInfo_CONV25.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }
        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _CONV20
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_CONV20, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_CONV20, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_CONV20, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_CONV20);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_CONV20, loanCommonInfo.LoanInfo_CONV20.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }
        try
        {
            //1-May-2015: Enhancement request - add 10yr and 20yr loans...
            // _CONV10
            LoanProviderInfo.setupLoanInfo(loanCommonInfo.LoanInfo_CONV10, loanCommonInfo.CreditScore, loanCommonInfo.DownPaymentPercentage, InterestRateOffsetsByLoanType.InterestRateOffsetByCreditScoreAndDownPayment_CONV10, MortgageInterestRatesByLoanType.UpfrontMortgageInterestRates_CONV10, MortgageInterestRatesByLoanType.MonthlyMortgageInterestRates_CONV10);
            LoanProviderInfo.FindBestLoanAmount(loanCommonInfo.LoanInfo_CONV10, loanCommonInfo.LoanInfo_CONV10.Payment_Maximum, loanCommonInfo.DownPaymentPercentage);
        }
        catch (IndexOutOfRangeException ex)
        {
            Console.WriteLine("Credit Score too low for this loan");
            Console.WriteLine(ex.GetType().FullName);
            Console.WriteLine(ex.Message);
        }

        return(loanCommonInfo);
    }