Possible to switch out a value that's being returned in an if/else method?
<p>I have the following code in a <code>Calculations.cs</code> class:</p>

<pre><code>public decimal decPaymentPlan(QuoteData quoteData)
    {
        if (quoteData.StepFilingInformation.PaymentPlanRadioButton 
            == StepFilingInformation.PaymentPlan.No)
            return PriceQuote.priceNoPaymentPlan;
        else
            return PriceQuote.pricePaymentPlanChapter7; //may want to switch
                                                        //to Chapter13 value
    }

public decimal CalculateChapter7(QuoteData quoteData)
    {
        decimal total = PriceQuote.priceChapter7;
        total += this.decPaymentPlan(quoteData); //want to be able to tell
                                                 //which to use, 7 or 13
        return total;
    }
</code></pre>

<p>I am trying to see if I can avoid an extra <code>decPaymentPlan</code> where the final return is <code>pricePaymentPlanChapter13</code>. I thought there might be a way to switch it out.</p>

<p>Otherwise, I'd have to do the following:</p>

<pre><code>public decimal decPaymentPlanChapter7(QuoteData quoteData)
    {
        ...
        else
            return PriceQuote.pricePaymentPlanChapter7;
    }

public decimal decPaymentPlanChapter13(QuoteData quoteData)
    {
        ...
        else
            return PriceQuote.pricePaymentPlanChapter13;
    }

...

//the following will appear anyway, but rather than just using
//one method call which switches the choice based on something
public decimal CalculateChpater7(QuoteData quoteData)
    {
        ...
        //instead of decPaymentPlan(quoteData) + something to switch
        total+= this.decPaymentPlanChapter7(quoteData);
        ...
    }

public decimal CalculateChpater13(QuoteData quoteData)
    {
        ...
        //instead of decPaymentPlan(quoteData) + something to switch
        total+= this.decPaymentPlanChapter13(quoteData);
        ...
    }
</code></pre>

<p>Is something like this doable (and how)? Thanks. Appreciate any code samples or guidance.</p>

<p><strong>UPDATE:</strong>
This is my controller:</p>

<pre><code>public ActionResult EMailQuote()
{
    Calculations calc = new Calculations();

    QuoteData quoteData = new QuoteData
    {
        StepFilingInformation = new Models.StepFilingInformation
        {
            //just moking user input here temporarily to test out the UI
            PaymentPlanRadioButton = Models.StepFilingInformation.PaymentPlan.Yes,
        }
     };

     var total = calc.CalculatePrice(quoteData);
     ViewBag.CalculatePrice = total; // ADDED THIS LINE
     return View(quoteData);
}
</code></pre>

<p>Also, I set a value in PriceQuote for Chapter7 and Chapter 13 (e.g., <code>public static decimal priceChapter7 { get { return 799; } }</code></p>
