public static void ShowDeleteWrestler(Guid wrestlerId) { var wrestler = WrestlerManager.Get(wrestlerId, _promotion.ID); DisplayHelper.ClearScreen(); Console.WriteLine("DELETE WRESTER"); Console.WriteLine("Are you sure you want to delete '" + wrestler.Name + "'? (y/n)"); var choice = Console.ReadKey(); switch (choice.KeyChar) { case 'y': WrestlerManager.Remove(wrestlerId, _promotion.ID); ShowViewWrestlers(); break; case 'n': ShowViewWrestler(wrestler); break; default: ShowDeleteWrestler(wrestlerId); break; } }
public static void ShowEditWrestler(Guid wrestlerId) { var wrestler = WrestlerManager.Get(wrestlerId, _promotion.ID); DisplayHelper.ClearScreen(); Console.WriteLine("WRESTLER DETAILS"); Console.WriteLine("1. Name: " + wrestler.Name); Console.WriteLine("2. Nickname: " + wrestler.Nickname); if (wrestler.Gender == GenderEnum.Male) { Console.WriteLine("3. Gender: Male"); } else if (wrestler.Gender == GenderEnum.Female) { Console.WriteLine("3. Gender: Female"); } Console.WriteLine("ATTRIBUTES"); Console.WriteLine("4. Agility: " + wrestler.Attributes.Agility); Console.WriteLine("5. Intelligence: " + wrestler.Attributes.Intelligence); Console.WriteLine("6. Strength: " + wrestler.Attributes.Strength); Console.WriteLine("7. Toughness: " + wrestler.Attributes.Toughness); Console.WriteLine(); Console.WriteLine("8. Back"); var choice = InputHelper.GetIntCharacter(1, 8); switch (choice) { case 1: wrestler.Name = InputHelper.GetString("New name: "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 2: wrestler.Name = InputHelper.GetString("New nickname: "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 3: wrestler.Gender = InputHelper.GetGender("New gender (M/F): "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 4: wrestler.Attributes.Agility = InputHelper.GetIntRating("Agility: "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 5: wrestler.Attributes.Intelligence = InputHelper.GetIntRating("Intelligence: "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 6: wrestler.Attributes.Strength = InputHelper.GetIntRating("Strength: "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 7: wrestler.Attributes.Toughness = InputHelper.GetIntRating("Toughness: "); WrestlerManager.Update(wrestler, _promotion.ID); ShowEditWrestler(wrestlerId); break; case 8: ShowViewWrestlers(); break; default: ShowEditWrestler(wrestlerId); break; } }