public ActionResult Add() { CategoryMappingDO model = new CategoryMappingDO(); return View(model); }
public ActionResult Add(CategoryMappingDO model, string saveAndNewButton) { if (ModelState.IsValid == false) return View(model); int resultID = CategoryMappingBL.Save(model, this.UserID); if (string.IsNullOrEmpty(saveAndNewButton) == false) { return RedirectToAction("Add"); } return RedirectToAction("Edit", new { id = resultID }); }
public ActionResult Edit(CategoryMappingDO model) { if (ModelState.IsValid == false) { return View(model); } int resultID = CategoryMappingBL.Update(model, this.UserID); return Edit(resultID); }