public Cocktails getCocktail() { IngredientDal cocDal = new IngredientDal(); List <Ingredient> ings = cocDal.findIngredients(cid); Category cat = (Category)category; return(new Cocktails(cid, ings, cat, preperation, video, name)); }
// Check validation of cocktail form public bool checkCocktailForm(Cocktails cocktail) { IngredientDal ingdal = new IngredientDal(); foreach (Ingredient ing in cocktail.ing) { if (ing.name == "" || ing.amount == "" || ingdal.locate(ing.name, cocktail.cid)) { return(false); } } return(true); }