MIS 333K - Asp1 using parameters - Fall 2009 - Byars

MIS 333K - Asp1 using parameters - Fall 2009 - Byars -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Partial Class _Default Inherits System.Web.UI.Page Dim valid As New ClassValidate Dim calc As New ClassCalculate Protected Sub Page_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Load Me .txtPriceGlazed.Text = FormatCurrency(1) Me .txtPriceChocolate.Text = FormatCurrency(1.5) Me .txtPriceRaspberry.Text = FormatCurrency(2) Me .txtPriceRegular.Text = FormatCurrency(1) Me .txtPriceIced.Text = FormatCurrency(1.5) Me .txtPriceMocha.Text = FormatCurrency(2) End Sub Protected Sub btnCalculate_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles btnCalculate.Click 'clears error label Me .lblErrorMessage.Text = "" 'if a quantity is blank, default set it to 0 If Me .txtGlazed.Text = "" Then Me .txtGlazed.Text = "0" End If If Me .txtChocolate.Text = "" Then Me .txtChocolate.Text = "0" End If If Me .txtRaspberry.Text = "" Then Me .txtRaspberry.Text = "0" End If If Me .txtRegular.Text = "" Then Me .txtRegular.Text = "0" End If If Me .txtIced.Text = "" Then Me .txtIced.Text = "0" End If If Me .txtMocha.Text = "" Then Me .txtMocha.Text = "0" End If 'check to see if all quantities are integers If valid.CheckInteger( Me .txtGlazed.Text) = False Then Me .lblErrorMessage.Text = "Error: Invalid Quantity for Glazed Donuts" Exit Sub End If If valid.CheckInteger( Me .txtChocolate.Text) = False Then Me .lblErrorMessage.Text = "Error: Invalid Quantity for Chocolate Donuts"
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

MIS 333K - Asp1 using parameters - Fall 2009 - Byars -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online