public ActionResult RoutingMasterNew(RoutingMaster routingMaster) { if (ModelState.IsValid) { if (this.genericMgr.FindAll<long>(duiplicateVerifyStatement, new object[] { routingMaster.Code })[0] > 0) { base.SaveErrorMessage(Resources.SYS.ErrorMessage.Errors_Existing_Code, routingMaster.Code); } else { this.genericMgr.CreateWithTrim(routingMaster); SaveSuccessMessage(Resources.PRD.Routing.RoutingMaster_Added); return RedirectToAction("RoutingList/" + routingMaster.Code); } } return View(routingMaster); }
public ActionResult RoutingMasterEdit(RoutingMaster routingMaster) { if (ModelState.IsValid) { this.genericMgr.UpdateWithTrim(routingMaster); SaveSuccessMessage(Resources.PRD.Routing.RoutingMaster_Updated); } //return new RedirectToRouteResult(new RouteValueDictionary // { // { "action", "RoutingList" }, // { "controller", "Routing" }, // { "id", routingMaster.Code } // }); return PartialView(routingMaster); }
public ActionResult _RoutingDropDownList(string controlName, string controlId, string selectedValue, bool? includeBlankOption) { ViewBag.ControlName = controlName; ViewBag.ControlId = controlId; IList<RoutingMaster> routingList = base.genericMgr.FindAll<RoutingMaster>(" from RoutingMaster as r where r.IsActive = ? ", true); if (routingList == null) { routingList = new List<RoutingMaster>(); } if (includeBlankOption.HasValue && includeBlankOption.Value) { RoutingMaster blankRoutingMaster = new RoutingMaster(); routingList.Insert(0, blankRoutingMaster); } return PartialView(new SelectList(routingList, "Code", "Name", selectedValue)); }