Option Strict On

Partial Class _Default
    Inherits System.Web.UI.Page
    Private priceDecimal As Decimal
    Private vcDecimal As Decimal
    Private fcDecimal As Decimal
    Private bepDecimal As Decimal

    Protected Sub computeBEPButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles computeBEPButton.Click
        Try
            priceDecimal = Decimal.Parse(priceTextBox.Text)
            vcDecimal = Decimal.Parse(vcTextBox.Text)
            fcDecimal = Decimal.Parse(fcTextBox.Text)
            bepDecimal = (fcDecimal / (priceDecimal - vcDecimal))
            BEPLabel.Text = bepDecimal.ToString("N2")
            Response.Cookies("BEP").Value = bepDecimal.ToString
            Session("totalFC") = fcDecimal.ToString
            ViewState("totalVC") = (bepDecimal * vcDecimal).ToString
            Application("totalRevenue") = (bepDecimal * priceDecimal).ToString

        Catch

        End Try

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not (IsPostBack) Then
            BEPLabel.Text = Application("BEP").ToString


        End If
    End Sub
End Class
