Website Summary Files Commits Branches @commit @diff @stats
path: root / src / VenueConsoleUI.cpp
diff options
context:
space:
mode:
Commit10d1ff68080549476a7529fe662eb3d91d18127b (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-05 13:53:32 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-05 13:53:32 +0300
Filesa64e470d857fb2b8dcc80908cccde79ea82ccd3d /src/VenueConsoleUI.cpp
FMI-OOP-P1_TicketSystem-10d1ff68080549476a7529fe662eb3d91d18127b.tar
FMI-OOP-P1_TicketSystem-10d1ff68080549476a7529fe662eb3d91d18127b.tar.gz
FMI-OOP-P1_TicketSystem-10d1ff68080549476a7529fe662eb3d91d18127b.zip
Parent9033a1d5f00607672c53168c1aa42bbe8b84384a (diff)
Autocommit at 05.05.2022 @ 13:53
1 files changed, 9 insertions, 1 deletions
-rw-r--r--src/VenueConsoleUI.cpp10
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) {