Example #1
0
        public bool AddIngredient(Ingredient ingredient)
        {
            bool ingredientAdded = false;

            try
            {
                if (ValidateIngredientadd(ingredient))
                {
                    IngredientDAL ingredientDAL = new IngredientDAL();
                    ingredientAdded = ingredientDAL.InsertIngredients(ingredient);
                }
            }
            catch (RecipeIngredientSystemExceptions)
            {
                throw;
                //MessageBox.Show("Do not leave any field blank.");
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(ingredientAdded);
        }