diff options
Autocommit at 05.05.2022 @ 13:53
1 files changed, 9 insertions, 1 deletions
| -rw-r--r-- | src/VenueConsoleUI.cpp | 10 |
diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp index 46161bd..6cdeb31 100644 --- a/src/VenueConsoleUI.cpp +++ b/src/VenueConsoleUI.cpp @@ -1,11 +1,19 @@ #include "VenueConsoleUI.h" #include "String/String.h" #include "DateTime/DateTime.h" +#include "EventSystem/StatusCodes.h" #include "ConsoleInterface/Menu.h" #include "ConsoleInterface/Toolbox.hpp" Venue v; +void handleStatusCode(StatusCode sc) { + switch (sc) { + case Success: printSuccess("Success!"); break; + default: break; + } +} + void command_newEvent() { printTitle("Creating new event"); @@ -21,7 +29,7 @@ void command_newEvent() { DateTime dt; inputBox("Enter event date and time: ", &dt); - v.get_es().createEvent(v.get_halls()[hallIndex], name, dt); + handleStatusCode(v.get_es().createEvent(&v.get_halls()[hallIndex], name, dt)); } void runUI(Venue& venue) { |
