clear scratchbook

This commit is contained in:
EggMan20339 2024-02-08 08:46:56 -05:00
parent 2671072f64
commit 61e82268ee

View File

@ -15,40 +15,6 @@ namespace ScratchBook
public Form1() public Form1()
{ {
InitializeComponent(); 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();
}
} }
} }
} }