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