Beispiel #1
0
 public async void refreshRecipe(string selectedRecipe)
 {
     //state = await getSessionID();
     selectedRecipeID = selectedRecipe;
     setRecipeIDQueryString(selectedRecipe);
     Model = RecipeHelper.GetRecipeDetails(selectedRecipe, state);
     StateHasChanged();
 }
Beispiel #2
0
        public async void refresh()
        {
            var uri = NavManager.ToAbsoluteUri(NavManager.Uri);

            Microsoft.Extensions.Primitives.StringValues firstout = "";
            if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("RID", out firstout))
            {
                selectedRecipeID = firstout;
                if (Model.idString != selectedRecipeID)
                {
                    Model = RecipeHelper.GetRecipeDetails(selectedRecipeID, state);
                }
            }
            state = await getSessionID();

            if (RecipeHelper.isLoggedIn(state))
            {
                recipes = await RecipeHelper.GetRecipes(state);
            }
            StateHasChanged();
        }