Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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();
    }
Ejemplo n.º 3
0
    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;
    }
Ejemplo n.º 4
0
    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();
    }