private void GetRestaurantList() { if (NetworkHelper.DetectNetwork()) { restaurantList = new RestaurantSpinnerAdapter(this, RestaurantController.GetRestaurantList()); spinner_Restaurant.Adapter = restaurantList; spinner_Restaurant.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs> (Restaurant_ItemSelected); } else { Toast.MakeText(this, "No internet connection", ToastLength.Short).Show(); } }
private void GetRestaurantList(){ if(NetworkHelper.DetectNetwork()){ restaurantList = new RestaurantSpinnerAdapter (this,RestaurantController.GetRestaurantList()); spinner_Restaurant.Adapter = restaurantList; spinner_Restaurant.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (Restaurant_ItemSelected); } else { Toast.MakeText (this, "No internet connection", ToastLength.Short).Show (); } }