Exemplo n.º 1
0
        public ActionResult Edit(HuTo huto)
        {
            if (ModelState.IsValid)
            {
                this.genericMgr.UpdateWithTrim(huto);
                SaveSuccessMessage(Resources.MRP.HuTo.HuTo_Updated);
            }

            return View(huto);
        }
Exemplo n.º 2
0
        public ActionResult New(HuTo huto)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    this.genericMgr.CreateWithTrim(huto);
                    SaveSuccessMessage(Resources.MRP.HuTo.HuTo_Added);
                    string Code = huto.Code;

                    return new RedirectToRouteResult(new RouteValueDictionary { { "action", "Edit" }, { "controller", "HuTo" }, { "Code", Code } });
                }
            }
            catch (Exception e)
            {
                if (e is CommitResourceException)
                {
                    SaveErrorMessage(Resources.EXT.ControllerLan.Con_TheDirectionAlreadyExits);
                }

            }

            return View(huto);
        }