public JsonResult ChangeStatus(Guid pkid, string status) { status = status == "0" ? "1" : "0"; ErrorCollectionbll bll = new ErrorCollectionbll(); string statuscode = "200"; string msg = ""; try { bll.ChangeErrorStatus(pkid, status); } catch (Exception) { statuscode = "500"; msg = "操作失败,请重试!"; } JsonResult jr = new JsonResult { Data = new { statuscode, msg } }; return(Json(jr, JsonRequestBehavior.AllowGet)); }