public string GetMoreDetails(int id) { DataAccess dataccess = new DataAccess(); CoffeeShop coffeeshop = dataccess.GetCoffeeShopById(id); string text = coffeeshop.DisplayName; if (coffeeshop.IsWiFiHotSpot) { text = text + "Tu jest internet"; } else { text = text + " Tu nie ma internetu"; } if (coffeeshop.SeatingCapacity < 10) { text = text + "; Mala kawiarnia"; } else if (coffeeshop.SeatingCapacity < 20) { text = text + "; Srednia kawiarnia"; } else { text = text + "; Duza kawiarnia"; } if (coffeeshop.SeatingCapacity > 20 && coffeeshop.AcceptsCoffeeCards) { text = text + " Kawiarnia dla WebMuses"; } return text; }
public string GetCoffeeShopName(int id) { DataAccess dataAccess = new DataAccess(); CoffeeShop shop = dataAccess.GetCoffeeShopById(id); string name = shop.DisplayName; return name; }