private bool CheckErrors() { bool Result = false; if (HotelCity.Text == "") { CityError.SetError(HotelCity, "Please Enter the Hotel City"); } if (HotelCountry.Text == "") { CountryError.SetError(HotelCountry, "Please Enter the Hotel Country"); } if (HotelStreet.Text == "") { StreetError.SetError(HotelStreet, "Please Enter the Hotel Street"); } if (!ValidHotelName(HotelName.Text)) { HotelNameError.SetError(HotelName, "This Hotel Name Already Exists"); Result = true; } if (!HelperClass.ValidEmail(HotelEmail.Text) || !HelperClass.UniqueHotelEmail(HotelEmail.Text, AddHotelConnection)) { HotelEmailError.SetError(HotelEmail, "This Email Is Not Valid or Already Exists"); Result = true; } if (!HelperClass.ValidPhoneNumber(HotelContactNumber.Text) || !HelperClass.UniqueHotelNumber(HotelContactNumber.Text, AddHotelConnection)) { NumberError.SetError(HotelContactNumber, "The Number Format You Entered Wrong, Correct Form 12 numbers Or Already Exists"); Result = true; } if (!HelperClass.ValidRating(HotelRating.Value)) { HotelRatingError.SetError(HotelRating, "Please Enter Rating For The Hotel"); Result = true; } return(Result); }