/// <summary> /// Calculates and prints out the subtotal, pst and gst charged, taxes, and total /// </summary> private void calculate() { _carWashInvoice = new CarwashInvoice(decimal.Parse(ConfigurationManager.AppSettings["PST"]), decimal.Parse(ConfigurationManager.AppSettings["GST"]), packageItem.Price, fragranceItem.Price); printSummary(); }
/// <summary> /// Retrieves the calculated values from the frmCarWash /// The values are passed into the car wash invoice labels /// </summary> /// <param name="carWashInvoice">For referencing the calculated values</param> public frmCarWashInvoice(CarwashInvoice invoice) { InitializeComponent(); this.Text = "Car Wash Invoice"; lblPackagePrice.Text = invoice.PackageCost.ToString("C"); lblFragrancePrice.Text = invoice.FragranceCost.ToString("N2"); lblSubtotal.Text = invoice.Subtotal.ToString("C"); lblTaxes.Text = (invoice.PSTCharged + invoice.GSTCharged).ToString("N2"); lblTotal.Text = invoice.Total.ToString("C"); }