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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user