public ActionResult Edit(Island island) { if (ModelState.IsValid) { this.genericMgr.UpdateWithTrim(island); SaveSuccessMessage(Resources.MRP.Island.Island_Updated); } return View(island); }
public ActionResult New(Island island) { try { //ModelState.Remove("Qty"); if (ModelState.IsValid) { this.genericMgr.CreateWithTrim(island); SaveSuccessMessage(Resources.MRP.Island.Island_Added); string Code = island.Code; //return RedirectToAction("Edit", new object[] { ProductLine, Item }); return new RedirectToRouteResult(new RouteValueDictionary { { "action", "Edit" }, { "controller", "Island" }, { "Code", Code } }); } } catch (Exception e) { if (e is CommitResourceException) { SaveErrorMessage(Resources.EXT.ControllerLan.Con_TheIslandAlreadyExits); } } return View(island); }