public ActionResult SendSortInfo(string orderdate, string batchId, string sortingLineCode, string orderId) { AddXmlValueBll bll = new AddXmlValueBll(); string text = "订单号:" + orderId + ",分拣编码:" + sortingLineCode + ",订单日期:" + orderdate + ",分拣批次:" + batchId; bll.insert("sortInfo", text); string msg = @"<?xml version='1.0' encoding='GB2312' ?> <message> <!--** 操作是否成功 true/false **--> <issuccess text='{0}'></issuccess> <!--** 返回信息 1:操作成功;2:其他错误。**--> <msg text='{1}' desc='{2}'></msg> </message>"; string error = string.Empty; if (TaskService.ProcessSortInfo(orderdate, batchId, sortingLineCode, orderId, ref error)) { msg = string.Format(msg, "true", "1", "操作成功"); } else { bll.insert("sortErr", error); msg = string.Format(msg, "true", "1", error); } return(new ContentResult() { Content = msg, ContentEncoding = Encoding.GetEncoding("GB2312"), ContentType = "text" }); }