Exemplo n.º 1
0
 // POST: api/GroceryApi/TagProduct
 public void TagProduct(int IdProducto)
 {
     try
     {
         var groceryListBLL = new GroceryListBLL();
         groceryListBLL.TagInGroceryList(IdProducto);
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 2
0
 // DELETE: api/GroceryApi/5
 public void Delete(int idProducto)
 {
     try
     {
         var groceryListBLL = new GroceryListBLL();
         groceryListBLL.DeleteProduct(idProducto);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemplo n.º 3
0
 // POST: api/GroceryApi
 public void Post(int IdProducto)
 {
     try
     {
         var groceryListBLL = new GroceryListBLL();
         groceryListBLL.AddProductToGroceryList(IdProducto);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 4
0
 // GET: api/GroceryApi
 public IEnumerable <Product> Get()
 {
     try
     {
         GroceryListBLL objGroceryListBll = new GroceryListBLL();
         var            lstGroceryList    = objGroceryListBll.ListProducts();
         return(lstGroceryList);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Método para mostrar la lista de productos
 /// </summary>
 /// <returns>Retorna una vista con la lista de productos</returns>
 public ActionResult ListProducts()
 {
     try
     {
         GroceryListBLL objGroceryListBll = new GroceryListBLL();
         var            lstProductList    = objGroceryListBll.ListProducts();
         return(View(lstProductList));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Método para mostrar la Grocery List
 /// </summary>
 /// <returns> retorna una vista con la Grocery List</returns>
 public ActionResult Index()
 {
     try
     {
         GroceryListBLL objGroceryListBll = new GroceryListBLL();
         var            lstGroceryList    = objGroceryListBll.ListPersonal();
         return(View(lstGroceryList));
     }
     catch (Exception)
     {
         throw;
     }
 }