Example #1
0
 public void CheckWishList(List <Realty> realties)
 {
     try
     {
         Console.WriteLine("Write client's index:");
         int indexOfClient = Convert.ToInt32(Console.ReadLine());
         Console.WriteLine("Write realty's index:");
         int indexOfRealty = Convert.ToInt32(Console.ReadLine());
         if (clientManagement.ShowClients[indexOfClient].WishList == null)
         {
             Console.WriteLine("List of propositions is emplty!!!");
             Console.WriteLine("You should fill it!");
             CreateWishList(realties);
         }
         bool check = clientManagement.Check(realties[indexOfRealty], indexOfClient);
         if (check)
         {
             Console.WriteLine("List of propositions contains this object");
         }
         else
         {
             Console.WriteLine("List of propositions doesn't contain this object");
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }