Ejemplo n.º 1
0
        public ActionResult Update(UpdateOwner updateOwner)
        {
            this.ViewData["CancelUrl"] = $"/Providers/Owner/Profile/{updateOwner.Id}";

            if (this.ModelState.IsValid)
            {
                int result = updateOwner.ExecuteNonQuery();
                return(Redirect($"/Providers/Owner/Profile/{updateOwner.Id}"));
            }

            return(View("FormPage", updateOwner));
        }
Ejemplo n.º 2
0
        public ActionResult Update(UpdateOwner updateOwner)
        {
            if (this.ModelState.IsValid)
            {
                int result = updateOwner.ExecuteNonQuery();
                return(new JsonResult()
                {
                    Data = new { Result = "Success" }
                });
            }

            this.AddAjaxPost($"/Providers/Owner/Update/{updateOwner.Id}", "Update Owner", x => x.OnSuccess = "paw.onAjaxFormSuccess");
            return(View("FormModal", updateOwner));
        }