private void UpdateBadge() { _badgeRepo.GetBadgeDictionary(); bool isRunning = true; while (isRunning) { Console.WriteLine("How would you like to update the badge?\n" + "1. Add Door Access\n" + "2. Delete a Badge\n" + "3. Return to Main Menu"); int input = int.Parse(Console.ReadLine()); switch (input) { case 1: SeeBadgeInfo(); Console.WriteLine("Which badge would you like to update with the new doors? (Choose corresponding number)"); int response = int.Parse(Console.ReadLine()); var updateBadge = _badgeRepo.GetBadgeDictionary()[response - 1]; NewDoorToBadge(); break; case 2: SeeBadgeInfo(); Console.WriteLine("Please choose the listed item number to remove."); int badgeRemove = int.Parse(Console.ReadLine()); _badgeRepo.GetBadgeDictionary().Remove(badgeRemove); break; case 3: isRunning = false; break; } } }
public void Run() { badgeDictionary = _badgeRepository.GetBadgeDictionary(); bool isRunning = true; while (isRunning) { Console.WriteLine("Welcome. What would you like to do?" + "\n1. Create Badge" + "\n2. Update Door Clearance on a Badge" + "\n3. Delete all doors from a Badge" + "\n4. Show List of All Badges"); int input = int.Parse(Console.ReadLine()); switch (input) { case 1: CreateBadge(); break; case 2: UpdateClearance(); break; case 3: DeleteDoors(); break; case 4: ShowDoorList(); break; } } }