private void btnHallTotal_Click(object sender, EventArgs e) { if (ValidationEvent.validateDiscountText(txtHallDiscount.Text)) { double discount; if (!txtHallDiscount.Text.Equals("")) { discount = Double.Parse(txtHallDiscount.Text); } else { discount = 1; } double discountPrice = Double.Parse(lblHallPrice.Text) * discount / 100; double totalPrice = Double.Parse(lblHallPrice.Text) - discountPrice; lblHallTotPrice.Text = totalPrice.ToString(); } else { MessageBox.Show("Disount should be a number between 0 and 100", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }