Ejemplo n.º 1
0
        protected void CallRecipeDetailsApi()
        {
            try
            {
                objRecipeDetails = CallApiBL.CallRecipeDetailsApi(recipeId);
                //objRecipeDetails.IngredientsCount = objRecipeDetails.ingredientLines.Count.ToString();

                BindDetails();
            }
            catch (Exception ex)
            {
                ex.SendMail();
            }
        }
Ejemplo n.º 2
0
        protected void CallGetRecipeApi()
        {
            try
            {
                SearchRecipes objSearchRecipe = new SearchRecipes();

                objSearchRecipe = CallApiBL.CallSearchRecipeApi(searchVal);

                foreach (Matches mat in objSearchRecipe.matches)
                {
                    if (mat.smallImageUrls != null && mat.smallImageUrls.Count > 0)
                    {
                        mat.smallImageUrl = mat.smallImageUrls[0];
                    }
                }

                rptRecipiesList.DataSource = objSearchRecipe.matches;
                rptRecipiesList.DataBind();
            }
            catch (Exception ex)
            {
                ex.SendMail();
            }
        }