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; }
public ActionResult IndexMulti(double lat, double lon, double r) { DataAccess dataAccess = new DataAccess(); CoffeeShop[] shops = dataAccess.FindByAreaRadius(lat, lon, r); PrinterHelper printerHelper = new PrinterHelper(); List<CoffeeShop> openShops = new List<CoffeeShop>(); foreach (CoffeeShop shop in shops) { if (shop.Open == 800) { openShops.Add(shop); } } shops = openShops.ToArray(); ViewBag.Message = printerHelper.Print(shops); return View("Index"); }