Esempio n. 1
0
 public static void RemoveAward()
 {
     Console.WriteLine("ID пользователя:");
     try
     {
         if (int.TryParse(Console.ReadLine(), out var indexUser) && userLogic.GetNeedUsers(indexUser).Any())
         {
             Console.WriteLine("Название награды:");
             string Title = Console.ReadLine();
             if (awardLogic.GetNeedAwards(indexUser, Title).Any())
             {
                 awardLogic.RemoveAward(indexUser, Title);
             }
             else
             {
                 throw new Exception("No correctly Title!");
             }
         }
         else
         {
             throw new Exception("No correctly IDUser!");
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("Некорректные данные пользователя/награды!");
     }
 }