예제 #1
0
 public ActionResult Edit(VMCategoryInfo category)
 {
     if (ModelState.IsValid)
     {
         catDB.Update(category);
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
예제 #2
0
        public ActionResult Delete(long?ID)
        {
            if (ID == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VMCategoryInfo model = catDB.Get(ID);

            if (model == null)
            {
                return(HttpNotFound());
            }
            return(View(model));
        }