private static void EditEvent(Dictionary <Event, List <Attendee> > events) { if (events.Count == 0) { Console.WriteLine("Ne postoji ni jedan rezerviran event trenutno."); return; } DisplayAllEventsNames(events); var foundEvent = EventDataProvider.ProvideEvent(events); if (foundEvent is Event == false) { return; } Console.WriteLine("Podaci eventa kojeg uređujete:"); Console.WriteLine(foundEvent.ToString()); Console.WriteLine(); var isEdittingDone = false; while (isEdittingDone == false) { Console.Clear(); var editFieldInput = EventDataProvider.ProvideEditEventFieldInput(); isEdittingDone = HandleEditEventField(editFieldInput, foundEvent, events); } }
private static void HandleEventReviewDisplay(Dictionary <Event, List <Attendee> > events) { int userInput; do { userInput = UserDialogDataProvider.FetchUsersInputFromEventDetailsSubmenu(); Console.Clear(); if (userInput == 4) { return; } DisplayAllEventsNames(events); var reviewEvent = EventDataProvider.ProvideEvent(events); if (reviewEvent is Event == false) { return; } switch (userInput) { case 1: DisplayEvent(reviewEvent); break; case 2: DisplayAttendeesByEvent(events[reviewEvent]); break; case 3: DisplayEventAndAttendees(reviewEvent, events[reviewEvent]); break; default: break; } Console.WriteLine(); } while (userInput != 4); }
private static void RemoveAttendeeFromEvent(Dictionary <Event, List <Attendee> > events) { Console.Clear(); DisplayAllEventsNames(events); Console.WriteLine("ODJAVA OSOBE SA EVENTA"); var registrationEvent = EventDataProvider.ProvideEvent(events); if (registrationEvent is Event == false) { return; } if (events.TryGetValue(registrationEvent, out var attendees) == false || attendees is null) { attendees = new List <Attendee>(); } HandleRemovingOfAttendeeFromEvent(attendees); }
private static void RegisterAttendeeOnEvent(Dictionary <Event, List <Attendee> > events) { Console.Clear(); DisplayAllEventsNames(events); Console.WriteLine("REGISTRACIJA OSOBE NA EVENT"); var registrationEvent = EventDataProvider.ProvideEvent(events); if (registrationEvent is Event == false) { return; } if (events.TryGetValue(registrationEvent, out var attendees) == false || attendees is null) { attendees = new List <Attendee>(); } HandleRegisteringOfAttendeeOnEvent(events, registrationEvent, attendees); }
private static void DeleteEvent(Dictionary <Event, List <Attendee> > events) { if (events.Count == 0) { Console.WriteLine("Ne postoji ni jedan rezerviran event trenutno."); return; } DisplayAllEventsNames(events); var foundEvent = EventDataProvider.ProvideEvent(events); if (foundEvent is Event == false) { return; } if (UserDialogDataProvider.ConfirmAction() == true) { events.Remove(foundEvent); Console.WriteLine($"Event je uspješno izbrisan."); } }