title: Trying to pass a parameter but getting a "context" error
body: <p>I am trying to pass this from my controller into my view (<code>@ViewBag.Chapter7Total</code>): </p>
  
  <pre><code>ViewBag.Chapter7Total = calc.CalculatePrice(quoteData, Chapter7);
  </code></pre>
  
  <p>But am getting a "doesn't exist in the current context error" in VS.</p>
  
  <p>Basically, I am trying to pass in a second parameter which determines which pricing structure to use between 2. Chapter7 or Chapter13, with the selection determining the second parameter to perform calculations with.</p>
  
  <p>Here are my methods:</p>
  
  <pre><code>class Chapter
  {
      public decimal PaymentPlan { get; set; }
      public decimal Price { get; set; }
  }
  
  public decimal decPaymentPlan(QuoteData quoteData, Chapter chapter)
  {
      if (quoteData.StepFilingInformation.PaymentPlanRadioButton 
          == StepFilingInformation.PaymentPlan.No)
          return PriceQuote.priceNoPaymentPlan;
      else
          return chapter.PaymentPlan;
  }
  
  public decimal Calculate(QuoteData quoteData, Chapter chapter)
  {
      decimal total = chapter.Price;
      total += this.decPaymentPlan(quoteData, chapter);
  
      return total;
  }
  
  static Chapter Chapter7 = new Chapter() { Price = 799.00m, PaymentPlan = 100.00m };
  </code></pre>
  
  <p>Finally, this is my controller:</p>
  
  <pre><code>public ActionResult EMailQuote()
  {
      Calculations calc = new Calculations();
      Chapter chap = new Chapter();
  
      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.Chapter7Total = calc.CalculatePrice(quoteData, Chapter7);
       return View(quoteData);
  }
  </code></pre>
  
  <p>I'm not sure what to do to pass Chapter7. Any thoughts?</p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>This is my ViewModel (<code>QuoteData</code>):</p>
  
  <pre><code>public class QuoteData
  {
      public PriceQuote priceQuote;
      public Calculations calculations;
      public StepFilingInformation stepFilingInformation { get; set; }
      public QuoteData()
      {
          PriceQuote = new PriceQuote();
          Calculations = new Calculations();
      }
  }
  </code></pre>