From 61e82268ee1372fea5aedfb9d36fe5825cd79988 Mon Sep 17 00:00:00 2001 From: EggMan20339 <99349302+EggMan20339@users.noreply.github.com> Date: Thu, 8 Feb 2024 08:46:56 -0500 Subject: [PATCH] clear scratchbook --- ScratchBook/Form1.cs | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/ScratchBook/Form1.cs b/ScratchBook/Form1.cs index 2d2e72c..440fc34 100644 --- a/ScratchBook/Form1.cs +++ b/ScratchBook/Form1.cs @@ -15,40 +15,6 @@ namespace ScratchBook public Form1() { InitializeComponent(); - - TextBox txtQuantity = new TextBox(); - TextBox txtPrice = new TextBox(); - ErrorProvider ep1 = new ErrorProvider(); - Label lblMessage = new Label(); - Int32 intQuantity = 0; - decimal decPrice = 0; - - - try - { - - intQuantity = Int32.Parse(txtQuantity.Text); - - try - { - - decPrice = decimal.Parse(txtPrice.Text); - - } - catch (Exception e) - { - ep1.SetError(txtPrice, "Invalid Value"); - lblMessage.Text = "Invalid Price"; - txtPrice.Focus(); - } - } - catch (Exception e) - { - ep1.SetError(txtQuantity, "Invalid Value"); - lblMessage.Text = "Invalid Quantity"; - txtQuantity.Focus(); - } - } } } \ No newline at end of file