private void List_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (list.SelectedItem != null) { l = list.SelectedItem as drink; isselect = true; if (listViewItem != null) { ContentPresenter contentPresenter = FindVisualChild <ContentPresenter>(listViewItem); DataTemplate dataTemplate = contentPresenter.ContentTemplate; TextBox tb = (TextBox)dataTemplate.FindName("tb", contentPresenter); Button bt = (Button)dataTemplate.FindName("bt", contentPresenter); bt.IsEnabled = false; tb.IsEnabled = false; tb.Text = ""; } listViewItem = (ListViewItem)(list.ItemContainerGenerator.ContainerFromItem(list.SelectedItem)); ContentPresenter myContentPresenter = FindVisualChild <ContentPresenter>(listViewItem); DataTemplate myDataTemplate = myContentPresenter.ContentTemplate; Button button = (Button)myDataTemplate.FindName("bt", myContentPresenter); TextBox textBox = (TextBox)myDataTemplate.FindName("tb", myContentPresenter); button.IsEnabled = true; textBox.IsEnabled = true; } }
public ActionResult DeleteConfirmed(int id) { drink drink = db.drinks.Find(id); db.drinks.Remove(drink); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdDrink,DrinkName,Description,Price,Amount")] drink drink) { if (ModelState.IsValid) { db.Entry(drink).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(drink)); }
public ActionResult Create([Bind(Include = "IdDrink,DrinkName,Description,Price,Amount")] drink drink) { if (ModelState.IsValid) { db.drinks.Add(drink); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(drink)); }
public ActionResult Edit([Bind(Include = "code,nameof,drinktypecode")] drink drink) { if (ModelState.IsValid) { db.Entry(drink).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.drinktypecode = new SelectList(db.drinktypes, "code", "nameof", drink.drinktypecode); return(View(drink)); }
public ActionResult Create([Bind(Include = "code,nameof,drinktypecode")] drink drink) { if (ModelState.IsValid) { db.drinks.Add(drink); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.drinktypecode = new SelectList(db.drinktypes, "code", "nameof", drink.drinktypecode); return(View(drink)); }
public bool Delete(string code) { drink dbEntry = mycoffee.drinks.Find(code); if (dbEntry == null) { return(false); } mycoffee.drinks.Remove(dbEntry); mycoffee.SaveChanges(); return(true); }
// GET: drinksUser/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } drink drink = db.drinks.Find(id); if (drink == null) { return(HttpNotFound()); } return(View(drink)); }
public bool Insert(drink model) { drink dbEntry = mycoffee.drinks.Find(model.code); if (dbEntry != null) { return(false); } mycoffee.drinks.Add(model); mycoffee.SaveChanges(); return(true); }
// GET: Coffee/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } drink drink = db.drinks.Find(id); if (drink == null) { return(HttpNotFound()); } ViewBag.drinktypecode = new SelectList(db.drinktypes, "code", "nameof", drink.drinktypecode); return(View(drink)); }
public bool Update(drink model) { drink dbEntry = mycoffee.drinks.Find(model.code); // LoaiBanDoc dbEntry = mycoffee.LoaiBanDocs. // Where(x => x.LoaiBanDoc1 = model.LoaiBanDoc1).FirstOrDefault(); if (dbEntry == null) { return(false); } dbEntry.nameof = model.nameof; mycoffee.SaveChanges(); return(true); }
public ActionResult DeleteConfirmed(int id) { drink drink = db.drinks.Find(id); using (Db2Entities dbContext = new Db2Entities()) { order order = dbContext.orders.SingleOrDefault(x => x.IdDrink == drink.IdDrink); if (order != null) { return(RedirectToAction("OrderError")); } else { db.drinks.Remove(drink); db.SaveChanges(); return(RedirectToAction("Index")); } } }
private void Button_Click(object sender, RoutedEventArgs e) { if (!isselect) { MessageBox.Show("Bạn chưa chọn sản phẩm!"); } else if (sl != 0) { var id_sp = new Database().ExcuteQuery("select ID from SanPham where TenSanPham = N'" + l.TenSanPham + "'").Rows[0][0]; var query = "Insert into Order_Ban Values ('" + ID_ban.ToString() + "','" + id_sp.ToString() + "','" + sl.ToString() + "')"; var ordered_sp = new Database().ExcuteQuery("select * from Order_Ban where ID_Ban = " + ID_ban.ToString() + " And Id_SP = " + id_sp.ToString()); if (ordered_sp.Rows.Count > 0) { query = "Update Order_Ban SET SoLuong = ( SoLuong + " + sl.ToString() + ") Where ID_Ban = " + ID_ban.ToString() + " And Id_SP = " + id_sp.ToString(); } var db = new Database().RunQuery(query); ListViewItem listViewItem = (ListViewItem)(list.ItemContainerGenerator.ContainerFromItem(list.SelectedItem)); ContentPresenter myContentPresenter = FindVisualChild <ContentPresenter>(listViewItem); DataTemplate myDataTemplate = myContentPresenter.ContentTemplate; TextBox textBox = (TextBox)myDataTemplate.FindName("tb", myContentPresenter); Button button = (Button)myDataTemplate.FindName("bt", myContentPresenter); button.IsEnabled = false; textBox.IsEnabled = false; list.SelectedItem = null; isselect = false; l = new drink(); SetBan(); Load_ListOrder(); } }
public ActionResult AcceptConfirmed(int id) { order order = db.orders.Find(id); using (Db2Entities dbContext = new Db2Entities()) { drink drink = dbContext.drinks.SingleOrDefault(x => x.IdDrink == order.IdDrink); if (drink.Amount >= order.Amount) { drink.Amount = drink.Amount - order.Amount; dbContext.SaveChanges(); db.orders.Remove(order); db.SaveChanges(); return(RedirectToAction("Index")); } else { return(RedirectToAction("StockError")); } } }
// DONE: beer, whiskey, vodka, taquilla, rum, gin, pitcher, wine, soft, juice, bottle, vermouth, shots, non-alcoholic, liquers, cocktails // LEFT: private List <drink> getAllDrinks() { List <drink> myDrinks = new List <drink>(); //get beer drink beer_goldstar = new drink("Goldstar", "pint 480 ml", "beer", "15 / 28", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_unflt = new drink("Goldstar unfiltered", "pint 480 ml", "beer", "15 / 28", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_macabbi = new drink("Macabbi", "pint 480 ml", "beer", "13 / 23", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_lagunitas = new drink("Lagunitas", "pint 480 ml", "beer", "18 / 34", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_dalirium = new drink("Dalirium", "glass 330ml", "beer", "35", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_carlsberg = new drink("Carlsberg", "pint 480 ml", "beer", "15 / 28", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_hoegardden = new drink("Hoegardden", "pint 480 ml", "beer", "18 / 34", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_weinVitus = new drink("Weinstephen Vitus", "pint 480 ml", "beer", "18 / 34", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_stella = new drink("Stella", "pint 480 ml", "beer", "18 / 34", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_guinness = new drink("Guinness", "pint 480 ml", "beer", "18 / 34", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_mpLager = new drink("Mikes Place Lager", "pint 480 ml", "beer", "14 / 26", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); drink beer_bluemoon = new drink("Bluemoon", "pint 480 ml", "beer", "18 / 34", "https://www.displayfakefoods.com/store/pc/catalog/2458-lg.jpg"); //get whiskey drink whiskey_jimbeam = new drink("Jim Beam", "S/D", "whiskey", "16 / 32", "https://images-na.ssl-images-amazon.com/images/I/8160PPJeERL._SX385_.jpg"); drink whiskey_bushmills = new drink("Bushmills", "S/D", "whiskey", "18 / 36", "https://images-na.ssl-images-amazon.com/images/I/51UU986ficL._SX679_.jpg"); drink whiskey_jameson = new drink("Jameson", "S/D", "whiskey", "20 / 40", "https://images.freshop.com/00080432500118/fd1f8a8b01c366351639bb8f01d1f5e0_medium.png"); drink whiskey_redLabel = new drink("Jhonnie walker red", "S/D", "whiskey", "20 / 40", "http://www.coreasdistribution.com/wp-content/uploads/johnny_walker_red.jpg"); drink whiskey_jimbeamBlack = new drink("Jim Beam Black", "S/D", "whiskey", "22 / 42", "https://images.freshop.com/00080686034209/db88150f7bd5501d7d7fe0488fd978a1_medium.png"); drink whiskey_jackDaniels = new drink("Jack Daniels", "S/D", "whiskey", "24 / 48", "https://www.gerrys.uk.com/content/images/thumbs/0000493_jack-daniels-70cl_256.png"); drink whiskey_blackLabel = new drink("Jhonnie Walker Black", "S/D", "whiskey", "25 / 50", "https://www.celticwhiskeyshop.com/image/data/Scottish%20Whiskey/Johnnie-Walker-Black-Label.jpg"); drink whiskey_blackbush = new drink("Black Bush", "S/D", "whiskey", "25 / 50", "https://images-na.ssl-images-amazon.com/images/I/71X3LvA9dTL._SY445_.jpg"); drink whiskey_makersMark = new drink("Makers Mark", "S/D", "whiskey", "26 / 52", "https://images.freshop.com/00085246139431/baad413c5ce2e8b0b474e79620e64bf9_medium.png"); drink whiskey_glen12 = new drink("Glenfidich 12", "S/D", "whiskey", "29 / 58", "http://d1lqpgkqcok0l.cloudfront.net/medias/sys_master/he2/h8d/8810694541342.jpg?buildNumber=762b487bb5b6d5161c1905bc66e5165f8d8a52ae"); drink whiskey_glen15 = new drink("Glenfidich 15", "S/D", "whiskey", "35 / 70", "https://bevvyco.s3.amazonaws.com/img/drinks/uy/osuy/af8411e8a16f3824b8dce4a28f46a72b-md.jpg"); drink whiskey_jentelmanJack = new drink("Jentelman Jack", "S/D", "whiskey", "35 / 70", "https://media.takealot.com/covers_tsins/43469335/082184029336-1-pdpxl.jpeg"); //get vodka drink vodka_stoli = new drink("Stoli", "S/D", "vodka", "15 / 30", "https://img.thewhiskyexchange.com/900/vodka_sto5.jpg"); drink vodka_stoliFlavour = new drink("Stoli with flavours", "S/D", "vodka", "18 / 36", "https://specsonline.com/wp-content/uploads/2018/09/081175102008.jpg"); drink vodka_ketelOne = new drink("Ketel One", "S/D", "vodka", "22 / 44", "http://www.coreasdistribution.com/wp-content/uploads/Ketel_one_vodka.jpg"); drink vodka_greyGoose = new drink("Grey Goose", "S/D", "vodka", "25 / 50", "https://images.freshop.com/00080480280000/d74995ce4eeca778c0b1e6ec123bfb30_medium.png"); //get taqilla drink taqilla_cuervoGold = new drink("Cuervo Gold", "S/D", "taquilla", "18 / 36", "https://bevvyco.s3.amazonaws.com/img/drinks/fy/zefy/645a536bc7804edc3dbc06b4a0755ef6-md.jpg"); drink taqilla_cuervoSilver = new drink("Cuervo Silver", "S/D", "taquilla", "20 / 40", "https://www.gerrys.uk.com/content/images/thumbs/0001114_jose-cuervo-silver-70cl_256.jpeg"); drink taqilla_patron = new drink("Patron Silver", "S/D", "taquilla", "25 / 50", "https://images.freshop.com/00721733000944/e8a40a4c540336c25452e6fc66615653_medium.png"); //get rum drink rum_captainMorgan = new drink("Captain Morgan Black", "S/D", "rum", "18 / 36", "https://images.freshop.com/00082000741992/f6145578c3fbe4639979b23ad68216b2_medium.png"); drink rum_captainMorganSpiced = new drink("Captain Morgan Spiced", "S/D", "rum", "18 / 36", "https://www.gerrys.uk.com/content/images/thumbs/0001302_morgans-spiced-70cl_256.jpeg"); drink rum_bacardi = new drink("Bacardi", "S/D", "rum", "20 / 40", "https://images.freshop.com/00080480015404/16a62d638ecbedf65e388697ec98ef01_medium.png"); //get gin drink gin_gordons = new drink("Gordons", "S/D", "gin", "18 / 36", "https://bevvyco.s3.amazonaws.com/img/drinks/uy/piuy/4e71fa6fcad73512edaf866ec785cb6b-md.jpg"); drink gin_bombay = new drink("Bombay", "S/D", "gin", "24 / 48", "https://www.gerrys.uk.com/content/images/thumbs/0000233_bombay-sapphire-70cl_256.png"); //get liquer - upload photos from here. drink liquer_arak = new drink("Arak", "S/D", "liquer", "15 / 30", "https://www.thewhiskyworld.com/images/elite-arak-p2257-6310_image.jpg"); drink liquer_fidg = new drink("Fidg", "S/D", "liquer", "15 / 30", "https://thumbnail.image.rakuten.co.jp/ran/img/3001/0004/004/752/252/492/30010004004752252492_1.jpg?_ex=128x128"); drink liquer_jager = new drink("Jagermaister", "S/D", "liquer", "18 / 36", "https://static.turbosquid.com/Preview/2019/05/29__18_30_55/Sig_Image0057.jpg3C1835B1-6F6C-4B29-B9A2-564622715AD9Default.jpg"); drink liquer_sambuca = new drink("Sambuca", "S/D", "liquer", "18 / 36", "https://www.gerrys.uk.com/content/images/thumbs/0002737_luxardo-sambuca-5cl_256.jpeg"); drink liquer_ouzo = new drink("Ouzo", "S/D", "liquer", "18 / 36", "https://www.ab.gr/medias/sys_master/h8f/h00/8893392781342.jpg"); drink liquer_southern = new drink("Southern Comfort", "S/D", "liquer", "20 / 40", "https://bevvyco.s3.amazonaws.com/img/drinks/gy/argy/fa3898311bc3a578313793ccca200609-md.jpg"); drink liquer_irishCream = new drink("Irish Cream", "S/D", "liquer", "20 / 40", "https://i0.wp.com/www.drinkhacker.com/wp-content/uploads/2017/04/Baileys-Original-Irish-Cream.jpg?ssl=1"); drink liquer_kaluah = new drink("Kaluah", "S/D", "liquer", "20 / 40", "https://upload.wikimedia.org/wikipedia/commons/3/37/Kahl%C3%BAa_700ml_imported_glass_bottle.jpg"); drink liquer_midori = new drink("Midori", "S/D", "liquer", "20 / 40", "https://cdn11.bigcommerce.com/s-b0811/images/stencil/original/products/2287/6110/midori__52558.1438317167.JPG?c=2&imbypass=on"); drink liquer_malibu = new drink("Malibu", "S/D", "liquer", "20 / 40", "https://www.dutyfree.co.il/media/catalog/product/cache/3/image/9df78eab33525d08d6e5fb8d27136e95/1/2/12131__12131.jpg"); drink liquer_absinth = new drink("Absinth", "S/D", "liquer", "25 / 50", "https://www.licorea.com/images/magictoolbox_cache/feabb61ae2a71c1844359f7cbe8b5d82/9/7/97/original/232139930/absenta_reythor_70-_cl.jpg"); drink liquer_cointreau = new drink("Cointreau", "S/D", "liquer", "25 / 50", "https://products1.imgix.drizly.com/ci-cointreau-2e73a93933df7dec.jpeg?auto=format%2Ccompress&fm=jpeg&q=20"); drink liquer_drambuie = new drink("Drambuie", "S/D", "liquer", "27 / 54", "https://upload.wikimedia.org/wikipedia/commons/3/39/New_drambuie_bottle.jpg"); drink liquer_hennessy = new drink("Hennessy", "S/D", "liquer", "27 / 54", "https://d3r6kbofdnmd8.cloudfront.net/media/catalog/product/cache/image/1536x/a4e40ebdc3e371adff845072e1c73f37/1/8/18291_Hennessy-VS-07L-40-Vol_4.jpg"); //get wine drink wine_white_gevurtz = new drink("Gevurtz", "sweet white wine", "wine", "36 / 122", "https://www.slowwineco.com.au/S3/withwine-webstore-prod/Wine/SKBvY0a3XUGsOUDaJBZW6g.jpg?h=256&autorotate=true"); drink wine_white_savignonBlanc = new drink("Savingnon Blanc", "half dry white wine", "wine", "36 / 122", "https://seewines.eu/media/catalog/product/cache/5/small_image/350x465/9df78eab33525d08d6e5fb8d27136e95/b/i/bialo_vino_sauvignon_blanc_barrel_fermented_maryan_2015_750ml.jpeg"); drink wine_red_cabarnetSyra = new drink("Cabarnet Syra", "red wine", "wine", "36 / 122", "https://www.kosherwine.com/media/catalog/product/cache/c687aa7517cf01e65c009f6943c2b1e9/g/o/gogklfd90nme5hdylmfo.jpg"); drink wine_red_shiraz = new drink("Shiraz", "red wine", "wine", "36 / 122", "https://images.ctfassets.net/6jpeaipefazr/1mkwCsJcGI2wk6CiAQKUKk/5dee55d669087b0a58f52801f5057e45/andrew-peace-shiraz-769432.png"); drink wine_bubble_lambrusco = new drink("Lambrusco", "bottle of red Lambrusco", "wine", "122", "https://shop.r10s.jp/budoukan/cabinet/img/179385.jpg"); drink wine_bubble_cava = new drink("Cava", "Sparkling cava", "wine", "36 / 122", "https://www.tanners-wines.co.uk/media/catalog/product/cache/image/700x700/e9c3970ab036de70892d86c6d221abfe/f/i/fi001.jpg"); drink wine_bubble_rose = new drink("Cava Rose", "Sparking cava rose", "wine", "36 / 122", "https://cdn1.wine-searcher.net/images/labels/19/84/10651984.jpg"); //get Pitcher drink pitcher_goldstar = new drink("Pitcher Goldstar", "1.7L", "pitcher", "79", "https://www.kegworks.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/b/e/beer-pitcher-go-b_1.jpg"); drink pitcher_unflt = new drink("Pitcher Goldstar Unfiltred", "1.7L", "pitcher", "81", "https://www.kegworks.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/b/e/beer-pitcher-go-b_1.jpg"); drink pitcher_mpLager = new drink("Pitcher M.P Lager", "1.7L", "pitcher", "79", "https://www.kegworks.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/b/e/beer-pitcher-go-b_1.jpg"); drink pitcher_macabbi = new drink("Pitcher Macabbi", "1.7L", "pitcher", "72", "https://www.kegworks.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/b/e/beer-pitcher-go-b_1.jpg"); //get bottle drink bottle_goldstar = new drink("Bottle of Goldstar", "500ml", "bottle", "25", "https://www.newyorkbeverage.com/wp-content/uploads/2017/09/goldstar-beer.jpg"); drink bottle_carlsberg = new drink("Bottle of Carlsberg", "500ml", "bottle", "26", "https://cheers.com.np/uploads/products/745865535163692567535253899763575165634049734.png"); drink bottle_tuborg = new drink("Bottle of Tuborg", "500ml", "bottle", "26", "https://i.pinimg.com/originals/69/a1/a6/69a1a643745b134afaadcb3e22a0e01e.jpg"); drink bottle_corona = new drink("Bottle of Corona", "330ml", "bottle", "26", "https://images-na.ssl-images-amazon.com/images/I/51npRN-UrvL._SX522_.jpg"); drink bottle_heinken = new drink("Bottle of Heinken", "330ml", "bottle", "29", "https://products1.imgix.drizly.com/ci-heineken-lager-6ea7dedfaaced647.jpeg?auto=format%2Ccompress&fm=jpeg&q=20"); drink bottle_leffeBrune = new drink("Bottle of Leffe Brune", "330ml", "bottle", "30", "https://cdn.beeradvocate.com/im/beers/1862.jpg"); drink bottle_strongbow = new drink("Bottle of Strongbow", "330ml", "bottle", "26", "https://products2.imgix.drizly.com/ci-strongbow-gold-apple-f54e949143c15d37.jpeg?auto=format%2Ccompress&fm=jpeg&q=20"); drink bottle_breezer = new drink("Bottle of Breezer Watermelon", "330ml", "bottle", "29", "http://www.eliasi.co.il/ProductsImages/I542657_2412019143718.jpg"); drink bottle_malca = new drink("Bottle of Malca", "330ml", "bottle", "32", "https://www.hagaban.co.il/wp-content/uploads/2018/10/%D7%9E%D7%9C%D7%9B%D7%94-%D7%91%D7%94%D7%99%D7%A8.jpg"); //get soft drink soft_cola = new drink("Bottle of Coke", "330ml", "soft", "14", "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/15-09-26-RalfR-WLC-0098.jpg/170px-15-09-26-RalfR-WLC-0098.jpg"); drink soft_colaZero = new drink("Bottle of Coke Zero", "330ml", "soft", "14", "https://m.pricez.co.il/ProductPictures/7290008909884.jpg"); drink soft_dietCola = new drink("Bottle of Diet Coke", "330ml", "soft", "14", "http://www.guyoffice.co.il/ProductsImages/s250/K298623.png"); drink soft_fuzeT = new drink("Bottle of Fuze T", "330ml", "soft", "14", "https://www.school-market.co.il/src.ashx?p=2&f=2203x636257160553472288_L.jpg&w=300&h=300&t=1"); drink soft_7up = new drink("Bottle of 7up", "330ml", "bottle", "14", "https://files.mishloha.co.il/files/menu_food_pic/FIL_268971_636687100777090875.jpg"); drink soft_diet7up = new drink("Bottle of Diet 7up", "330ml", "soft", "14", "https://files.mishloha.co.il/files/menu_food_pic/thumbnail/FIL_268972_636687101220773636.jpg"); drink soft_beer = new drink("Bottle of black beer", "330ml", "soft", "14", "http://misterburger.co.il/wp-content/uploads/2015/12/%D7%94%D7%95%D7%A8%D7%93.jpg"); drink soft_gingerAle = new drink("Bottle of Ginger Ale", "330ml", "soft", "14", "https://blend.co.il/wp-content/uploads/2018/12/Tempo_images-adjust4.jpg"); drink soft_mineral = new drink("Bottle of Mineral water", "330ml", "soft", "10", "https://cashcow-cdn.azureedge.net/images/c1c1298d-a8b4-4ae8-b321-32215e3f9119.jpg"); drink soft_soda = new drink("Bottle of Soda", "330ml", "soft", "12", "https://files-ptdpritol.netdna-ssl.com/system/photos/2897260/large/70e282ab567c1545f186f9560fdd3d55.jpg"); drink soft_tonic = new drink("Bottle of Tonic", "330ml", "soft", "14", "https://m.pricez.co.il/ProductPictures/7290008464321.jpg"); drink soft_blu = new drink("Energy drink Blu", "330ml", "soft", "14", "https://files-ptdpritol.netdna-ssl.com/system/photos/3432560/show/d4d3dc2e50dd43b8f6b07d8eab0400c2.jpg"); drink soft_redBull = new drink("Energy drink RedBull", "330ml", "soft", "25", "https://www.volgshop.ch/wp-content/uploads/2015/04/Red_Bull.jpg"); //get juice drink juice_orange = new drink("Orange Juice", "S/L", "juice", "9 / 15", "https://www.thenational.ae/image/policy:1.884956:1563261659/image/jpeg.jpg?f=16x9&w=1200&$p$f$w=dfa40e8"); drink juice_lemonade = new drink("Lemonade Juice", "S/L", "juice", "9 / 15", "https://previews.123rf.com/images/photomaru/photomaru1212/photomaru121200003/16887957-glass-of-lemonade-or-lemon-juice-isolated-on-white.jpg"); drink juice_grapefruit = new drink("Red Grapefruit Juice", "S/L", "juice", "9 / 15", "https://images.wisegeek.com/glass-of-grapefruit-juice.jpg"); drink juice_apple = new drink("Apple Juice", "S/L", "juice", "9 / 15", "https://st2.depositphotos.com/1177973/7550/i/950/depositphotos_75508049-stock-photo-glass-of-apple-juice-with.jpg"); drink juice_cranberry = new drink("Cranberry Juice", "S/L", "juice", "9 / 15", "https://previews.123rf.com/images/galamik/galamik1203/galamik120300046/12758725-glass-of-cranberry-juice-on-a-white-background.jpg"); drink juice_pineapple = new drink("Pineapple Juice", "S/L", "juice", "9 / 15", "https://previews.123rf.com/images/karandaev/karandaev1204/karandaev120400003/13202604-pineapple-juice-in-a-glass-isolated-on-white-background.jpg"); //get vermouth drink vermouth_campari = new drink("Campari", "S/D", "vermouth", "18 / 36", "https://www.camparigroup.com/sites/default/files/brand/campari_1.png"); drink vermouth_bianco = new drink("Martini Bianco", "D", "vermouth", "20", "https://img.thewhiskyexchange.com/900/vermo_mar66.jpg"); drink vermouth_rosso = new drink("Martini Rosso", "D", "vermouth", "20", "https://manila-wine.com/media/catalog/product/cache/1/image/700x700/9df78eab33525d08d6e5fb8d27136e95/m/a/martini-rosso.jpg"); drink vermouth_extraDry = new drink("Martini Extra Dry", "D", "vermouth", "20", "https://www.31dover.com/media/image/b6/9a/71/31dover-martini_extra_dry-shadow320x1000_1__1.jpg"); //get non-alcoholic drink nonAlcoholic_heineken0 = new drink("Heinken 0.0", "330ml", "non-alcoholic", "26", "https://images-na.ssl-images-amazon.com/images/I/41tfYlRfZiL._SY450_.jpg"); drink nonAlcoholic_luckyVirgin = new drink("Lucky Virgin", "Non-alcoholic Cocktail", "non-alcoholic", "25", "https://static.vinepair.com/wp-content/uploads/2017/10/strawberry-card.jpg"); //get shots drink shots_babyGuinness = new drink("Baby Guinness", "Kaluah, Bailyes, Jameson", "shots", "25", "https://cocktails365.files.wordpress.com/2010/09/img_0043.jpg"); drink shots_brainDamage = new drink("Brain Damage", "Peach liquer, beilyes, grenadin", "shots", "25", "https://d1alt1wkdk73qo.cloudfront.net/images/guide/1a1ef27166ba4c678f7e7a32df007567/478x640_ac.jpg"); drink shots_thinRedLine = new drink("Thin Red Line", "Sambuca, Tabascco, Cuervo", "shots", "25", "https://i.pinimg.com/originals/eb/7d/2f/eb7d2f10296646cc8c7da6a327e3aaaf.jpg"); drink shots_b52 = new drink("B52", "Kaluah, Bailyes, Controue", "shots", "29 / 50", "https://mixthatdrink.com/wp-content/uploads/2009/03/b52-shot-735x1103.jpg"); drink shots_kamikaze = new drink("Kamikaze", "Stoly, Tripple Sec, Sour", "shots", "29 / 50", "https://cdn.diffords.com/contrib/stock-images/2016/12/43/201698803ccfcd2df237877ff41c735d9be4.jpg"); drink shots_irishCarBomb = new drink("Irish Car Bomb", "Guinness, Jameson, Irish Cream", "shots", "45 / 80", "https://cdn.liquor.com/wp-content/uploads/2019/07/12110253/irish-car-bomb-720x720-recipe.jpg"); drink shots_jagerBomb = new drink("Jager Bomb", "Blu, Jeger", "shots", "29 / 50", "https://thefndc.com/wp-content/uploads/2011/09/jagerbomb-main.jpg"); //get cocktails drink cocktail_chaley = new drink("Charley", "vodka, peach liquer, coconut liquer, sour, pineapple juice and grenadin", "cocktails", "42", "https://images.cocktailflow.com/v1/cocktail/w_300,h_540/cocktail_pink_rum-1.png"); drink cocktail_berrySour = new drink("Berry Sour", "berry stoly vodka, sour, berrys", "cocktails", "45", "http://1.bp.blogspot.com/-s-w0F1hR8BI/VU_NrVu8eVI/AAAAAAAAGvE/uTphkOvPttA/s1600/Honey%2Bberry%2Bsour.jpg"); drink cocktail_longIsland = new drink("Long Island Iced Tea", "vodka, rum, jin, taquilla, tripple sec, lemon juice and coke", "cocktails", "45", "https://i.ytimg.com/vi/cUZTStHFePw/maxresdefault.jpg"); drink cocktail_margarita = new drink("Margarita", "cuervo, tripple sec and lime", "cocktails", "45", "https://www.thecocktailproject.com/sites/default/files/classicmargarita_beauty-1175-Edit_thumbnail.jpg"); drink cocktail_sexOnTheBeach = new drink("Sex On The Beach", "vodka, peach liquer, orange juice and cranberry", "cocktails", "42", "https://cdn.liquor.com/wp-content/uploads/2015/10/20001944/il_fullxfull.322976552.jpg"); drink cocktail_midoriSour = new drink("Midori Sour", "Midoru and Sour", "cocktails", "42", "https://i.pinimg.com/originals/09/d2/e4/09d2e47ce84da4ccedcda734135a5741.jpg"); drink cocktail_mohito = new drink("Mohito", "captain morgan spiced with sour and soda", "cocktails", "42", "https://media-cdn.tripadvisor.com/media/photo-s/0c/a2/61/e5/mohito.jpg"); drink cocktail_maiTai = new drink("Mai Tai", "rum, ammarto, tripple sec, sour, pineapple juice and grenadin", "cocktails", "42", "https://cdn.liquor.com/wp-content/uploads/2017/08/31104342/IMG_0007-768x1024.jpg"); //push beer myDrinks.Add(beer_goldstar); myDrinks.Add(beer_unflt); myDrinks.Add(beer_macabbi); myDrinks.Add(beer_lagunitas); myDrinks.Add(beer_dalirium); myDrinks.Add(beer_carlsberg); myDrinks.Add(beer_hoegardden); myDrinks.Add(beer_weinVitus); myDrinks.Add(beer_stella); myDrinks.Add(beer_guinness); myDrinks.Add(beer_mpLager); myDrinks.Add(beer_bluemoon); //push whiskey myDrinks.Add(whiskey_jimbeam); myDrinks.Add(whiskey_bushmills); myDrinks.Add(whiskey_jameson); myDrinks.Add(whiskey_redLabel); myDrinks.Add(whiskey_jimbeamBlack); myDrinks.Add(whiskey_jackDaniels); myDrinks.Add(whiskey_blackLabel); myDrinks.Add(whiskey_blackbush); myDrinks.Add(whiskey_makersMark); myDrinks.Add(whiskey_glen12); myDrinks.Add(whiskey_glen15); myDrinks.Add(whiskey_jentelmanJack); //push vodka myDrinks.Add(vodka_stoli); myDrinks.Add(vodka_stoliFlavour); myDrinks.Add(vodka_ketelOne); myDrinks.Add(vodka_greyGoose); //push taquilla myDrinks.Add(taqilla_cuervoGold); myDrinks.Add(taqilla_cuervoSilver); myDrinks.Add(taqilla_patron); //push rum myDrinks.Add(rum_captainMorgan); myDrinks.Add(rum_captainMorganSpiced); myDrinks.Add(rum_bacardi); //push gin myDrinks.Add(gin_gordons); myDrinks.Add(gin_bombay); //push liquer myDrinks.Add(liquer_arak); myDrinks.Add(liquer_fidg); myDrinks.Add(liquer_jager); myDrinks.Add(liquer_sambuca); myDrinks.Add(liquer_ouzo); myDrinks.Add(liquer_southern); myDrinks.Add(liquer_irishCream); myDrinks.Add(liquer_kaluah); myDrinks.Add(liquer_midori); myDrinks.Add(liquer_malibu); myDrinks.Add(liquer_absinth); myDrinks.Add(liquer_cointreau); myDrinks.Add(liquer_drambuie); myDrinks.Add(liquer_hennessy); //push wine myDrinks.Add(wine_white_gevurtz); myDrinks.Add(wine_white_savignonBlanc); myDrinks.Add(wine_red_cabarnetSyra); myDrinks.Add(wine_red_shiraz); myDrinks.Add(wine_bubble_lambrusco); myDrinks.Add(wine_bubble_cava); myDrinks.Add(wine_bubble_rose); //push pitcher myDrinks.Add(pitcher_goldstar); myDrinks.Add(pitcher_unflt); myDrinks.Add(pitcher_mpLager); myDrinks.Add(pitcher_macabbi); //push bottle myDrinks.Add(bottle_goldstar); myDrinks.Add(bottle_tuborg); myDrinks.Add(bottle_carlsberg); myDrinks.Add(bottle_corona); myDrinks.Add(bottle_heinken); myDrinks.Add(bottle_leffeBrune); myDrinks.Add(bottle_strongbow); myDrinks.Add(bottle_breezer); myDrinks.Add(bottle_malca); //push soft myDrinks.Add(soft_cola); myDrinks.Add(soft_colaZero); myDrinks.Add(soft_dietCola); myDrinks.Add(soft_fuzeT); myDrinks.Add(soft_7up); myDrinks.Add(soft_diet7up); myDrinks.Add(soft_beer); myDrinks.Add(soft_gingerAle); myDrinks.Add(soft_soda); myDrinks.Add(soft_mineral); myDrinks.Add(soft_tonic); myDrinks.Add(soft_blu); myDrinks.Add(soft_redBull); //push juice myDrinks.Add(juice_orange); myDrinks.Add(juice_lemonade); myDrinks.Add(juice_grapefruit); myDrinks.Add(juice_apple); myDrinks.Add(juice_cranberry); myDrinks.Add(juice_pineapple); //push vermouth myDrinks.Add(vermouth_campari); myDrinks.Add(vermouth_bianco); myDrinks.Add(vermouth_rosso); myDrinks.Add(vermouth_extraDry); //push non-alcoholic myDrinks.Add(nonAlcoholic_heineken0); myDrinks.Add(nonAlcoholic_luckyVirgin); //push shots myDrinks.Add(shots_babyGuinness); myDrinks.Add(shots_brainDamage); myDrinks.Add(shots_thinRedLine); myDrinks.Add(shots_kamikaze); myDrinks.Add(shots_b52); myDrinks.Add(shots_irishCarBomb); myDrinks.Add(shots_jagerBomb); //push cocktails myDrinks.Add(cocktail_chaley); myDrinks.Add(cocktail_berrySour); myDrinks.Add(cocktail_longIsland); myDrinks.Add(cocktail_margarita); myDrinks.Add(cocktail_sexOnTheBeach); myDrinks.Add(cocktail_midoriSour); myDrinks.Add(cocktail_mohito); myDrinks.Add(cocktail_maiTai); return(myDrinks); }
//public List<drink> GetListDrink() //{ // return mycoffee.drinks.ToList(); //} public drink FindEntity(string code) { drink dbEntry = mycoffee.drinks.Find(code); return(dbEntry); }