public ActionResult PostUpdate(UpdateModels model) { Guid OrgID = new Guid(Session["OrgID"].ToString()); Org org = orgService.GetOrgByID(OrgID); ViewBag.Org = org; if (!ModelState.IsValid) { return(View("Update", model)); } org.OrgID = OrgID; org.OrgContact = model.OrgContact; org.OrgDepartment = model.OrgDepartment; org.OrgIntroduction = model.OrgIntro; if (orgService.UpdateInfo(org)) { Session["Org"] = org; return(Content("<script>alert('修改信息成功~');window.location.href='Search'</script>")); } else { ModelState.AddModelError("", "修改异常"); return(View("Update", model)); } }