I want to check two statements in one if statement. Maybe for you its a easy question!
I have the following code written:
var roommatch = reservations.FirstOrDefault(p => p.roomnumber == Convert.ToInt32(kamercomboBox.SelectedItem.ToString()));
var datematch = reservations.FirstOrDefault(p => p.date == date);
if (roommatch == null && datematch == null)
{
reservations.Add(new Reservation(multiplenames, lastnameTextBox.Text, gendercomboBox.SelectedText, Convert.ToInt32(ageNumericUpDown.Value), Convert.ToInt32(kamercomboBox.SelectedItem.ToString()), Convert.ToInt32(quantityUpDown.Value), date));
}
With this i check the date and roomnumber
But now i need something which checks of i can reserve a room on another date.
Aucun commentaire:
Enregistrer un commentaire