public string GetBindingReqBody(string exceptionID) { string retBody = "ExceptionID为空,无法寻找请求消息体!"; if (!(String.IsNullOrEmpty(exceptionID))) { ESB.ExceptionService exceptionService = new ESB.ExceptionService(); ESB.ExceptionCoreTb exception = exceptionService.GetExceptionByID(exceptionID); XmlDocument doc = new XmlDocument(); if (!(String.IsNullOrEmpty(exception.MessageBody))) { try { doc.LoadXml(exception.MessageBody); XmlNodeList list = doc.GetElementsByTagName("消息内容"); if (list.Count > 0) { String msgContent = list[0].InnerText; if (msgContent.Length > 1024000) { retBody = msgContent.Substring(0, 1024000) + "(剩余数据隐藏)"; } else { retBody = msgContent; } } else { retBody = exception.MessageBody; } } catch { retBody = exception.MessageBody; } } else { retBody = "请求消息体为空!"; } } return(retBody); }
protected void grid_OnCustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID != "btnPigeonhole") { return; } String exceptionID = grid.GetRowValues(e.VisibleIndex, "ExceptionID").ToString(); String messageID = grid.GetRowValues(e.VisibleIndex, "MessageID").ToString(); ESB.ExceptionService exceptionService = new ESB.ExceptionService(); exceptionService.DeleteExceptionByID(exceptionID); ESB.AuditService auditService = new ESB.AuditService(); auditService.ExceptionPigeonhole(messageID); grid.DataBind(); }
public string GetBindingReqBody(string exceptionID) { string retBody = "ExceptionID为空,无法寻找请求消息体!"; if (!(String.IsNullOrEmpty(exceptionID))) { ESB.ExceptionService exceptionService = new ESB.ExceptionService(); ESB.ExceptionCoreTb exception = exceptionService.GetExceptionByID(exceptionID); XmlDocument doc = new XmlDocument(); if (!(String.IsNullOrEmpty(exception.MessageBody))) { try { doc.LoadXml(exception.MessageBody); XmlNodeList list = doc.GetElementsByTagName("消息内容"); if (list.Count > 0) { String msgContent = list[0].InnerText; if (msgContent.Length > 1024000) retBody = msgContent.Substring(0, 1024000) + "(剩余数据隐藏)"; else retBody = msgContent; } else { retBody = exception.MessageBody; } } catch { retBody = exception.MessageBody; } } else { retBody = "请求消息体为空!"; } } return retBody; }
protected void grid_OnCustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID != "btnPigeonhole") return; String exceptionID = grid.GetRowValues(e.VisibleIndex, "ExceptionID").ToString(); String messageID = grid.GetRowValues(e.VisibleIndex, "MessageID").ToString(); ESB.ExceptionService exceptionService = new ESB.ExceptionService(); exceptionService.DeleteExceptionByID(exceptionID); ESB.AuditService auditService = new ESB.AuditService(); auditService.ExceptionPigeonhole(messageID); grid.DataBind(); }