Website Summary Files Commits Branches @commit @diff @stats
path: root / src / VenueConsoleUI.cpp
diff options
context:
space:
mode:
Commit91946fd15ab678768b0b682c6f4c87ba513f20e4 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-05 17:53:34 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-05 17:53:34 +0300
Files36490e6ca9db0f8e9dcdd45343cf19dbb3815c07 /src/VenueConsoleUI.cpp
FMI-OOP-P1_TicketSystem-91946fd15ab678768b0b682c6f4c87ba513f20e4.tar
FMI-OOP-P1_TicketSystem-91946fd15ab678768b0b682c6f4c87ba513f20e4.tar.gz
FMI-OOP-P1_TicketSystem-91946fd15ab678768b0b682c6f4c87ba513f20e4.zip
Parent496621640f216d27ab53e82da5eeaaaa78a77b32 (diff)
Autocommit at 05.05.2022 @ 17:53
1 files changed, 12 insertions, 0 deletions
-rw-r--r--src/VenueConsoleUI.cpp12
diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp
index 7cee64e..dc9e25b 100644
--- a/src/VenueConsoleUI.cpp
+++ b/src/VenueConsoleUI.cpp
@@ -2,6 +2,7 @@
#include "String/String.h"
#include "Date/Date.h"
#include "EventSystem/StatusCodes.h"
+#include "EventSystem/Reservation.h"
#include "EventSystem/EventSystem.h"
#include "ConsoleInterface/Menu.h"
#include "ConsoleInterface/Toolbox.hpp"
@@ -12,6 +13,7 @@ Menu mainMenu("FMI Ticket System"), ticketManagementMenu("Ticket management"), e
void handleStatusCode(StatusCode sc) {
switch (sc) {
case Success: printSuccess("Success!"); break;
+ case E_EventDoesNotExist: printError("Event doesn't exist!");
default: break;
}
}
@@ -50,6 +52,16 @@ void command_reserveTicket() {
inputLineBox("Enter event name: ", name, MAX_LINE_WIDTH);
Date date;
inputBox("Enter event date: ", &date);
+ char password[PASSWORD_LEN];
+ inputBox("Enter password [Max 8 characters]: ", &password);
+ char note[NOTE_LEN];
+ inputBox("Enter note [Max 32 characters]: ", &note);
+ unsigned row;
+ inputBox("Enter row: ", &row);
+ unsigned seat;
+ inputBox("Enter seat: ", &seat);
+
+ handleStatusCode(v->get_es().reserveTicket(name, date, password, note, row, seat));
}
void command_cancelReservation() {