Exemplo n.º 1
0
        public IActionResult PickAllergenChoice(PickAllergen model)

        {
            //Get list of all allergens again
            var allergens = GetAllAllergens();

            //Set the allergens on the model. This is done because only the selected value from drop dow is posted back but we want all of them.
            model.Allergens = GetSelectListItems(allergens);
        }
Exemplo n.º 2
0
        // GET: /<controller>/

        //Action method for displaying "Pick Allergen" page
        public IActionResult PickAllergenChoice()

        {
            //Retrieve allergens for a drop down list
            var allergens = GetAllAllergens();

            var model = new PickAllergen();


            //Make a list of SelectListItems to be rendered on the page
            model.Allergens = GetSelectListItem(allergens);
            return(View(model));
        }