Пример #1
0
 private void cbRestaurantAdd_DropDown(object sender, EventArgs e)
 {
     try
     {
         var NSC = new NewsServiceClient("BasicHttpBinding_INewsService",
                                         $"http://{wcfServerIp}/INewService");
         string[] restaurants = NSC.SelectRestorans();
         cbRestaurantAdd.Items.Clear();
         foreach (var restaurant in restaurants)
         {
             cbRestaurantAdd.Items.Add(restaurant);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Server with restaurants is not connected right now");
     }
 }