예제 #1
0
        public ActionResult EditProduct(int id)
        {
            Product p = catalogDao.GetProduct(id);

            if (p != null)
            {
                return(View(p));
            }
            return(Redirect("/Admin/EditCatalog"));
        }
예제 #2
0
파일: Cart.cs 프로젝트: SeMurA823/ASP_Shop
        public Dictionary <Product, int> GetProducts()
        {
            CatalogDao catalogDao         = new CatalogDao();
            Dictionary <Product, int> res = new Dictionary <Product, int>();

            foreach (var id in keyValuePairs.Keys)
            {
                res[catalogDao.GetProduct(id)] = keyValuePairs[id];
            }
            return(res);
        }
예제 #3
0
 public ActionResult Model(int id)
 {
     ViewBag.product = catalogDao.GetProduct(id);
     return(View());
 }