public ActionResult SaveOccupationClass(string OccpationClassId, string OccpationClassName) { IOccupationBLL bLL = new OccupationBLL(); OccupationClass occupationClass = new OccupationClass { Id = Convert.ToInt32(OccpationClassId), Name = OccpationClassName }; if (bLL.SaveOccupationClass(occupationClass)) { TempData["info"] = "保存成功"; return(Redirect("/Settings/OccupationSettings")); } else { TempData["error"] = "保存失败"; return(Redirect(Request.UrlReferrer.AbsoluteUri)); } }