Ejemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            ItemDAO itemDAO = new ItemDAO();

            itemDAO.Delete(id);

            List <ItemModel> items = itemDAO.FetchAll();

            return(View("Index", items));
        }
Ejemplo n.º 2
0
        // GET: Items
        public ActionResult Index()
        {
            // generate some fake data and send it to a view
            List <ItemModel> items = new List <ItemModel>();

            //items.Add(new ItemModel(0, "T-Shirt Adidas", "Men", "65", "10", "Original t-shirt."));
            //items.Add(new ItemModel(0, "Skirt", "Woman", "55", "15", "Great Scirt."));
            //items.Add(new ItemModel(0, "Men's Jacket", "Men", "65", "150", ""));

            ItemDAO itemDAO = new ItemDAO();

            items = itemDAO.FetchAll();

            return(View("Index", items));
        }