コード例 #1
0
        public ActionResult Create(ProductCategories productCategories)
        {
            try
            {

                service.Save(productCategories);
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
コード例 #2
0
 public ActionResult Edit(ProductCategories productCategories)
 {
     try
     {
         // TODO: Add update logic here
         service.Save(productCategories);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
コード例 #3
0
 //
 // GET: /ProductCategories/Create
 public ActionResult Create()
 {
     var count = service.GetCount();
     var productCategories = new ProductCategories { Id = count, Code = "C" + (count + 1) };
     return View(productCategories);
 }