|
@@ -2084,6 +2084,51 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ #region G客户NTF功能:GetMaInfo
|
|
|
+ public static bool GetMaInfo(string sn, out MaInfo maInfo, SQLiteConnection errorDBNow)
|
|
|
+ {
|
|
|
+ string desc;
|
|
|
+ maInfo = null;
|
|
|
+ string strPost = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
|
|
|
+ "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"+
|
|
|
+ "<soap:Body>"+
|
|
|
+ "<GetMaInfo xmlns=\"http://tempuri.org/\">"+
|
|
|
+ "<sn>"+sn+"</sn>"+
|
|
|
+ "</GetMaInfo>"+
|
|
|
+ "</soap:Body>"+
|
|
|
+ "</soap:Envelope>";
|
|
|
+
|
|
|
+ HttpHelper http = new HttpHelper();
|
|
|
+ HttpItem item = new HttpItem()
|
|
|
+ {
|
|
|
+ Encoding = Encoding.Default,
|
|
|
+ Method = "post",
|
|
|
+ ContentType = "text/xml",
|
|
|
+ KeepAlive = false
|
|
|
+ };
|
|
|
+
|
|
|
+ item.URL = "http://smes-prd-app01.tclking.com:9002/SAPService.asmx";
|
|
|
+ item.Postdata = strPost;
|
|
|
+ HttpResult result = http.GetHtml(item);
|
|
|
+ if (result.StatusCode == System.Net.HttpStatusCode.OK)
|
|
|
+ {
|
|
|
+ Log.WriteGetKeyLog("\r\nGetMaInfo :\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + result.Html);
|
|
|
+ if (!Xmlconfig.GetMaInfoXml(result.Html, out maInfo, out desc))
|
|
|
+ {
|
|
|
+ CommonMethod.ReportErrormsg("GetMaInfo error", desc + "\r\n" + result.Html + "\r\nAddress: " + item.URL + "\r\nPostdata: " + item.Postdata, errorDBNow);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ CommonMethod.ReportErrormsg("GetMaInfo error", result.StatusDescription + "\r\n" + result.Html + "\r\nAddress: " + item.URL + "\r\nPostdata: " + item.Postdata, errorDBNow);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
}
|
|
|
|
|
|
/// <summary>
|