// POST: api/GroceryApi/TagProduct public void TagProduct(int IdProducto) { try { var groceryListBLL = new GroceryListBLL(); groceryListBLL.TagInGroceryList(IdProducto); } catch (Exception ex) { } }
// DELETE: api/GroceryApi/5 public void Delete(int idProducto) { try { var groceryListBLL = new GroceryListBLL(); groceryListBLL.DeleteProduct(idProducto); } catch (Exception ex) { throw; } }
// POST: api/GroceryApi public void Post(int IdProducto) { try { var groceryListBLL = new GroceryListBLL(); groceryListBLL.AddProductToGroceryList(IdProducto); } catch (Exception) { throw; } }
// GET: api/GroceryApi public IEnumerable <Product> Get() { try { GroceryListBLL objGroceryListBll = new GroceryListBLL(); var lstGroceryList = objGroceryListBll.ListProducts(); return(lstGroceryList); } catch (Exception) { throw; } }
/// <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; } }
/// <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; } }