private string deleteMac(HttpContext context) { Json jsonResult = new Json(); string id = context.Request["id"]; string data = context.Request["data"]; if (!string.IsNullOrEmpty(data)) { id = ""; JArray ja = (JArray)JsonConvert.DeserializeObject(data); foreach (JObject objid in ja) { id += objid["id"] + ","; } id = id.Substring(0, id.Length - 1); } int result = ms.deleteMac(id); if (result > 0) { jsonResult.Success = true; jsonResult.Msg = "操作成功"; } else if (result == -1) { jsonResult.Success = false; jsonResult.Msg = "发生异常"; } else { jsonResult.Success = false; jsonResult.Msg = "未知错误"; } string strJson = JsonConvert.SerializeObject(jsonResult); return(strJson); }