Ejemplo n.º 1
0
 /*Funcion: Obtiene todas los productos
   Param:
   Return: Lista ProductsView
   */
 public List<ProductsView> getProducts()
 {
     RecipeService recipe = new RecipeService();
     return recipe.getProducts();
 }
        /*
        Metodo que llena el dropdown list de productos
        */
        private void fillProducts()
        {
            RecipeService recipeService = new RecipeService();
            List<ProductsView> recipeProduct = recipeService.getProducts();
            Product2.DataSource = recipeProduct;
            Product2.DataBind();

            ListItem l = new ListItem("", "", true);
            l.Selected = true;
            Product2.Items.Insert(0, l);
        }