public ActionResult UptSolvePeople(int id) { var ids = Convert.ToInt32(JsonConvert.DeserializeObject(HttpContext.Session.GetString("info"))); //获取登录人信息 var seesi = HttpContext.Session.GetString("user"); var user = JsonConvert.DeserializeObject <UserAndRole>(seesi); var alarms = new Alarm() { OutID = id, SolvePeopleId = user.ID, OverTime = DateTime.Now }; //修改信息 var result = _alarm.UptAlarm(ids, alarms); //修改警员状态 var resultTwo = _alarm.UptUserState(id); if (result > 0) { if (resultTwo > 0) { return(Content("<script>alert('操作成功');var index = parent.layer.getFrameIndex(window.name);window.parent.location.reload();parent.layer.close(index); location.href='/Alarm/CaptainOperation'</script>", "text/html;charset=utf-8")); } } return(Content("<script>alert('操作失败');var index = parent.layer.getFrameIndex(window.name);window.parent.location.reload();parent.layer.close(index); location.href='/Alarm/CaptainOperation'</script>", "text/html;charset=utf-8")); }