Updateed some formatting and bug fixes

Fixed inconsistencies in queries that would result in errors because
the parameters were missing. Updating a guest is an example that had
this issue. After checking parameters should all be supplied where
needed.
This commit is contained in:
雲華
2022-04-17 18:55:38 -04:00
parent 0ce34d9d23
commit 0a5fa3e402
6 changed files with 36 additions and 16 deletions

View File

@@ -576,6 +576,19 @@ internal class Program
Console.WriteLine("You currently do not have an active registration.");
return;
}
if (activeReservation.StartDate.Date < DateTime.Now.Date && activeReservation.CheckIn == null)
{
Console.WriteLine("Your reservation is no longer valid, it has been cancelled. You may be charged based on your reservation type.");
activeReservation.CancelReservation();
activeReservation = null;
return;
}
if (activeReservation.CheckIn != null)
{
Console.WriteLine("You can't update a reservation that has been checked in.");
return;
}
Console.Write("Your current reservation details are:\n" +
$"\tStarts on: {activeReservation.StartDate.ToString("yyyy-MM-dd")}\n" +
@@ -711,6 +724,7 @@ internal class Program
}
activeReservation.CancelReservation();
Console.WriteLine("Your reservation has been cancelled because you failed to pay within the payment period.");
activeReservation = null;
return;
}
}