Ejemplo n.º 1
0
        //Show all restaurant name and location
        void showAll()
        {
            List <Restaurant> restaurantList;
            RestaurantService restaurantService = new RestaurantService();

            restaurantList = restaurantService.GetAllSearchList();
            listBox1.Items.Clear();
            foreach (var item in restaurantList)
            {
                string listItem = string.Format("{0}-{1}", item.Name, item.Location);
                listBox1.Items.Add(listItem);
            }
        }