예제 #1
0
        public bool SendZBZLResult(string jylsh, string jycs, string jyxm, string zbzl, string zhpd)
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点

                XmlElement xe11 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe11.InnerText = station_id;
                XmlElement xe12 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe12.InnerText = line_id;
                XmlElement xe13 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe13.InnerText = jylsh;
                XmlElement xe14 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe14.InnerText = jycs;
                XmlElement xe15 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe15.InnerText = jyxm;
                XmlElement xe16 = xmldoc.CreateElement("zbzl");      //创建一个<Node>节点
                xe16.InnerText = zbzl;
                XmlElement xe17 = xmldoc.CreateElement("zbzlpd");    //创建一个<Node>节点
                xe17.InnerText = zhpd;
                XmlElement xe18 = xmldoc.CreateElement("sqip");      //创建一个<Node>节点
                xe18.InnerText = local_ip;

                xe1.AppendChild(xe11);
                xe1.AppendChild(xe12);
                xe1.AppendChild(xe13);
                xe1.AppendChild(xe14);
                xe1.AppendChild(xe15);
                xe1.AppendChild(xe16);
                xe1.AppendChild(xe17);
                xe1.AppendChild(xe18);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("SendZBZLResult_Send:   18C81\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(upload_interface.writeObjectOut(xtlb, jkxlh, "18C81", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                string code, message;
                if (XmlOperation.ReadACKString(receiveXml, out code, out message) && code == "1")
                {
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("发送整备质量检测结果失败:\r\n" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("SendZBZLResult_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #2
0
        /// <summary>
        /// 触发拍照18S04
        /// </summary>
        /// <param name="model">拍照信息</param>
        /// <param name="code">写入返回代码</param>
        /// <param name="message">错误信息</param>
        public bool writeCapturePicture(XlycapturePicture model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe104.InnerText = model.jycs;
                XmlElement xe105 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe105.InnerText = model.hpzl;
                XmlElement xe106 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe106.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe107 = xmldoc.CreateElement("clsbdh");    //创建一个<Node>节点
                xe107.InnerText = model.clsbdh;
                XmlElement xe109 = xmldoc.CreateElement("pzcfsj");    //创建一个<Node>节点
                xe109.InnerText = model.pzcfsj;
                XmlElement xe110 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe110.InnerText = model.jyxm;
                XmlElement xe111 = xmldoc.CreateElement("zpzl");      //创建一个<Node>节点
                xe111.InnerText = model.zpzl;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe109);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeCapturePicture_Send:  XTLB:" + Xtlb + "|JKXLH:" + Jkxlh + "|JKID:18S04\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18S04", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeCapturePicture_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writeProjectFinishhn(wgprojectFinish model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("writecondition"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");          //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");         //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");          //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");           //创建一个<Node>节点
                xe104.InnerText = model.jycs;
                XmlElement xe105 = xmldoc.CreateElement("hpzl");           //创建一个<Node>节点
                xe105.InnerText = model.hpzl;
                XmlElement xe106 = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                xe106.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe107 = xmldoc.CreateElement("clsbdh");         //创建一个<Node>节点
                xe107.InnerText = model.clsbdh;
                XmlElement xe108 = xmldoc.CreateElement("gwjysbbh");       //创建一个<Node>节点
                xe108.InnerText = model.gwjysbbh;
                XmlElement xe109 = xmldoc.CreateElement("jyxm");           //创建一个<Node>节点
                xe109.InnerText = model.jyxm;
                XmlElement xe110 = xmldoc.CreateElement("jssj");           //创建一个<Node>节点
                xe110.InnerText = model.jssj;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe109);
                xe1.AppendChild(xe110);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeProjectFinishhn_Send: 212\r\n" + send_xml + "\r\n");

                string receiveXml = "";// HttpUtility.UrlDecode(hnwgwebref.writeObjectXml("212", Jczdm, key, send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeProjectFinishhn_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writeGaProjectStart(AcprojectStart model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = Jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe104.InnerText = model.jycs;
                XmlElement xe105 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe105.InnerText = model.hpzl;
                XmlElement xe106 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe106.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe107 = xmldoc.CreateElement("clsbdh");    //创建一个<Node>节点
                xe107.InnerText = model.clsbdh;
                XmlElement xe108 = xmldoc.CreateElement("gwjysbbh");  //创建一个<Node>节点
                xe108.InnerText = model.gwjysbbh;
                XmlElement xe109 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe109.InnerText = model.jyxm;
                XmlElement xe110 = xmldoc.CreateElement("kssj");      //创建一个<Node>节点
                xe110.InnerText = XmlOperation.encodeUTF8(model.kssj);
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe109);
                xe1.AppendChild(xe110);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeGaProjectStart_Send:  JKXLH:" + Jkxlh + "|JKID:18C55\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(access.WriteService(Jkxlh, "18C55", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeGaProjectStart_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writetestDetailResulthn(wgtestDetailResult model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("writecondition"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");          //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");         //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");          //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jyxm");           //创建一个<Node>节点
                xe104.InnerText = model.jyxm;
                XmlElement xe105 = xmldoc.CreateElement("jycs");           //创建一个<Node>节点
                xe105.InnerText = model.jycs;


                XmlElement xe111 = xmldoc.CreateElement("cwkc");     //创建一个<Node>节点
                xe111.InnerText = model.cwkc;
                XmlElement xe112 = xmldoc.CreateElement("cwkk");     //创建一个<Node>节点
                xe112.InnerText = model.cwkk;
                XmlElement xe113 = xmldoc.CreateElement("cwkg");     //创建一个<Node>节点
                xe113.InnerText = model.cwkg;
                XmlElement xe114 = xmldoc.CreateElement("clwkccpd"); //创建一个<Node>节点
                xe114.InnerText = model.clwkccpd;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe111);
                xe1.AppendChild(xe112);
                xe1.AppendChild(xe113);
                xe1.AppendChild(xe114);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writetestDetailResulthn_Send: 423\r\n" + send_xml + "\r\n");

                string receiveXml = "";// HttpUtility.UrlDecode(hnwgwebref.writeObjectXml("423", Jczdm, key, send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writetestDetailResulthn_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool write18J11(xd18J11 model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe102.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe103 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                if (model.hpzl.Contains("("))
                {
                    xe103.InnerText = model.hpzl.Split('(')[1].Split(')')[0];
                }
                else
                {
                    xe103.InnerText = model.hpzl;
                }
                XmlElement xe104 = xmldoc.CreateElement("clsbdh"); //创建一个<Node>节点
                xe104.InnerText = model.clsbdh;
                XmlElement xe105 = xmldoc.CreateElement("gwxm");   //创建一个<Node>节点
                xe105.InnerText = model.gwxm;
                XmlElement xe106 = xmldoc.CreateElement("jcxdh");  //创建一个<Node>节点
                xe106.InnerText = model.jcxdh;
                XmlElement xe107 = xmldoc.CreateElement("lx");     //创建一个<Node>节点
                xe107.InnerText = model.lx;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("write18J11_Send:  18J11\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18J11", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("write18J11_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #7
0
        /// <summary>
        /// 外廓检测结果18C81_M1
        /// </summary>
        /// <param name="model">结果信息</param>
        /// <param name="code">写入返回代码</param>
        /// <param name="message">错误信息</param>
        public bool writetestDetailResult(XlytestDetailResult model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe104.InnerText = model.jyxm;
                XmlElement xe105 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe105.InnerText = model.jycs;
                XmlElement xe106 = xmldoc.CreateElement("cwkc");      //创建一个<Node>节点
                xe106.InnerText = model.cwkc;
                XmlElement xe107 = xmldoc.CreateElement("cwkk");      //创建一个<Node>节点
                xe107.InnerText = model.cwkk;
                XmlElement xe108 = xmldoc.CreateElement("cwkg");      //创建一个<Node>节点
                xe108.InnerText = model.cwkg;
                XmlElement xe109 = xmldoc.CreateElement("clwkccpd");  //创建一个<Node>节点
                xe109.InnerText = model.clwkccpd;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe109);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writetestDetailResult_Send:  XTLB:" + Xtlb + "|JKXLH:" + Jkxlh + "|JKID:18C81\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18C81", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writetestDetailResult_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #8
0
        /// <summary>
        /// 发整备质量结果
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public bool writeZbzlDetails(gxZbzlDetailResult model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jcbh");      //创建一个<Node>节点
                xe101.InnerText = model.jcbh;
                XmlElement xe102 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe102.InnerText = "PB";
                XmlElement xe103 = xmldoc.CreateElement("zxh");       //创建一个<Node>节点
                xe103.InnerText = model.zxh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe104.InnerText = model.jycs;
                XmlElement xe105 = xmldoc.CreateElement("zbzl");      //创建一个<Node>节点
                xe105.InnerText = model.zbzl;
                XmlElement xe106 = xmldoc.CreateElement("zbzlpd");    //创建一个<Node>节点
                xe106.InnerText = model.zbzlpd;
                XmlElement xe107 = xmldoc.CreateElement("cbmc");      //创建一个<Node>节点
                xe107.InnerText = XmlOperation.encodeGBK(model.cbmc);
                XmlElement xe108 = xmldoc.CreateElement("ip");        //创建一个<Node>节点
                xe108.InnerText = model.ip;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeZbzlDetails_Send:  Xtlb:" + Xtlb + "|Jkid:18C81|Yhdh:" + Yhdh + "|Jkxh:" + Jkxh + "\r\n" + send_xml + "\r\n");

                StringBuilder receiveXml = new StringBuilder();
                receiveXml.Length = 10240;
                gxDll.writeObjectOut(Xtlb, "18C81", send_xml, Yhdh, Jkxh, receiveXml);
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml.ToString() + "\r\n");

                XmlOperation.ReadACKString(receiveXml.ToString(), out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeZbzlDetails_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #9
0
        public bool writeVideoFinish(wkVedioStartAndFinish model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe104 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe104.InnerText = model.jyjgbh;
                XmlElement xe105 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe105.InnerText = model.hpzl;
                XmlElement xe106 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe106.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe107 = xmldoc.CreateElement("tongdao");   //创建一个<Node>节点
                xe107.InnerText = model.tongdao;
                XmlElement xe110 = xmldoc.CreateElement("gongwei");   //创建一个<Node>节点
                xe110.InnerText = model.gongwei;
                XmlElement xe111 = xmldoc.CreateElement("xuhao");     //创建一个<Node>节点
                xe111.InnerText = model.xuhao;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeVideoFinish_Send:  9992\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "9992", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeVideoFinish_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writeStart(wkStartAndFinish model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe104.InnerText = model.jycs;
                XmlElement xe105 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe105.InnerText = model.hpzl;
                XmlElement xe106 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe106.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe107 = xmldoc.CreateElement("clsbdh");    //创建一个<Node>节点
                xe107.InnerText = model.clsbdh;
                XmlElement xe110 = xmldoc.CreateElement("sj");        //创建一个<Node>节点
                xe110.InnerText = model.sj;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe110);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeStart_Send:\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.wkcc(model.jylsh, send_xml, "0"));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeStart_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="jylsh"></param>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="clsbdh"></param>
        /// <param name="filePath"></param>
        /// <param name="zplx"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        public bool writeTestImage(string jylsh, string hphm, string hpzl, string clsbdh, string filePath, string zplx, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = jylsh;
                XmlElement xe102 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe102.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe103 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe103.InnerText = hpzl;
                XmlElement xe104 = xmldoc.CreateElement("clsbdh");    //创建一个<Node>节点
                xe104.InnerText = clsbdh;
                XmlElement xe105 = xmldoc.CreateElement("zplx");      //创建一个<Node>节点
                xe105.InnerText = zplx;
                XmlElement xe106 = xmldoc.CreateElement("zp");        //创建一个<Node>节点
                xe106.InnerText = XmlOperation.PushTxt(filePath);
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writeTestImage_Send:  18W03\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18W03", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writeTestImage_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool write18J16(xd18J16 model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe104.InnerText = model.jyxm;
                XmlElement xe105 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe105.InnerText = model.jycs;
                XmlElement xe106 = xmldoc.CreateElement("cwkc");      //创建一个<Node>节点
                xe106.InnerText = model.cwkc;
                XmlElement xe107 = xmldoc.CreateElement("cwkcpd");    //创建一个<Node>节点
                xe107.InnerText = model.cwkcpd;
                XmlElement xe108 = xmldoc.CreateElement("cwkk");      //创建一个<Node>节点
                xe108.InnerText = model.cwkk;
                XmlElement xe109 = xmldoc.CreateElement("cwkkpd");    //创建一个<Node>节点
                xe109.InnerText = model.cwkkpd;
                XmlElement xe110 = xmldoc.CreateElement("cwkg");      //创建一个<Node>节点
                xe110.InnerText = model.cwkg;
                XmlElement xe111 = xmldoc.CreateElement("cwkgpd");    //创建一个<Node>节点
                xe111.InnerText = model.cwkgpd;
                XmlElement xe112 = xmldoc.CreateElement("hxnbcd");    //创建一个<Node>节点

                XmlElement xe113 = xmldoc.CreateElement("hxnbcdpd");  //创建一个<Node>节点
                xe113.InnerText = model.hxnbcdpd;
                XmlElement xe114 = xmldoc.CreateElement("hxnbkd");    //创建一个<Node>节点

                XmlElement xe115 = xmldoc.CreateElement("hxnbkdpd");  //创建一个<Node>节点
                xe115.InnerText = model.hxnbkdpd;
                XmlElement xe116 = xmldoc.CreateElement("hxnbgd");    //创建一个<Node>节点

                XmlElement xe117 = xmldoc.CreateElement("hxnbgdpd");  //创建一个<Node>节点
                xe117.InnerText = model.hxnbgdpd;
                XmlElement xe118 = xmldoc.CreateElement("zj");        //创建一个<Node>节点

                XmlElement xe119 = xmldoc.CreateElement("zjpd");      //创建一个<Node>节点
                xe119.InnerText = model.zjpd;
                XmlElement xe120 = xmldoc.CreateElement("clwkccpd");  //创建一个<Node>节点
                xe120.InnerText = model.clwkccpd;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe109);
                xe1.AppendChild(xe110);

                xe1.AppendChild(xe111);
                xe1.AppendChild(xe112);
                xe1.AppendChild(xe113);
                xe1.AppendChild(xe114);
                xe1.AppendChild(xe115);
                xe1.AppendChild(xe116);
                xe1.AppendChild(xe117);
                xe1.AppendChild(xe118);
                xe1.AppendChild(xe119);
                xe1.AppendChild(xe120);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("GetVehicleList_Send:  18J16\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18J16", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleList_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #13
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writetestDetailResult(wktestDetailResult model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe105 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe105.InnerText = model.jycs;


                XmlElement xe111 = xmldoc.CreateElement("cwkc");     //创建一个<Node>节点
                xe111.InnerText = model.cwkc;
                XmlElement xe112 = xmldoc.CreateElement("cwkk");     //创建一个<Node>节点
                xe112.InnerText = model.cwkk;
                XmlElement xe113 = xmldoc.CreateElement("cwkg");     //创建一个<Node>节点
                xe113.InnerText = model.cwkg;
                XmlElement xe114 = xmldoc.CreateElement("clwkccpd"); //创建一个<Node>节点
                xe114.InnerText = model.clwkccpd;
                XmlElement xe115 = xmldoc.CreateElement("cwkcsx");   //创建一个<Node>节点
                xe115.InnerText = model.cwkcsx;
                XmlElement xe116 = xmldoc.CreateElement("cwkcxx");   //创建一个<Node>节点
                xe116.InnerText = model.cwkcxx;
                XmlElement xe117 = xmldoc.CreateElement("cwkcpd");   //创建一个<Node>节点
                xe117.InnerText = model.cwkcpd;
                XmlElement xe118 = xmldoc.CreateElement("cwkksx");   //创建一个<Node>节点
                xe118.InnerText = model.cwkksx;
                XmlElement xe119 = xmldoc.CreateElement("cwkkxx");   //创建一个<Node>节点
                xe119.InnerText = model.cwkkxx;
                XmlElement xe120 = xmldoc.CreateElement("cwkkpd");   //创建一个<Node>节点
                xe120.InnerText = model.cwkkpd;
                XmlElement xe121 = xmldoc.CreateElement("cwkgsx");   //创建一个<Node>节点
                xe121.InnerText = model.cwkgsx;
                XmlElement xe122 = xmldoc.CreateElement("cwkgxx");   //创建一个<Node>节点
                xe122.InnerText = model.cwkgxx;
                XmlElement xe123 = xmldoc.CreateElement("cwkgpd");   //创建一个<Node>节点
                xe123.InnerText = model.cwkgpd;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe111);
                xe1.AppendChild(xe112);
                xe1.AppendChild(xe113);
                xe1.AppendChild(xe114);
                xe1.AppendChild(xe115);
                xe1.AppendChild(xe116);
                xe1.AppendChild(xe117);
                xe1.AppendChild(xe118);
                xe1.AppendChild(xe119);
                xe1.AppendChild(xe120);
                xe1.AppendChild(xe121);
                xe1.AppendChild(xe122);
                xe1.AppendChild(xe123);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writetestDetailResult_Send:\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.wkcc(model.jylsh, send_xml, "1"));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writetestDetailResult_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #14
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool write18C63(wk18C63 model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);

                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe104.InnerText = model.jycs;
                XmlElement xe105 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe105.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe106 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                if (model.hpzl.Contains("("))
                {
                    xe106.InnerText = model.hpzl.Split('(')[1].Split(')')[0];
                }
                else
                {
                    xe106.InnerText = model.hpzl;
                }
                XmlElement xe107 = xmldoc.CreateElement("clsbdh"); //创建一个<Node>节点
                xe107.InnerText = model.clsbdh;
                XmlElement xe108 = xmldoc.CreateElement("zp");     //创建一个<Node>节点
                if (model.zp != "")
                {
                    xe108.InnerText = XmlOperation.PushTxt(model.zp);
                }
                else
                {
                    xe108.InnerText = "";
                }
                XmlElement xe109 = xmldoc.CreateElement("pssj"); //创建一个<Node>节点
                xe109.InnerText = model.pssj;
                XmlElement xe110 = xmldoc.CreateElement("jyxm"); //创建一个<Node>节点
                xe110.InnerText = model.jyxm;
                XmlElement xe111 = xmldoc.CreateElement("zpzl"); //创建一个<Node>节点
                xe111.InnerText = model.zpzl;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe109);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("write18C63_Send:  18C63\r\n" + XmlOperation.removePictureInfo(send_xml, new string[1] {
                    @"<zp>"
                }, new string[1] {
                    @"</zp>"
                }) + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18C63", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("write18C63_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #15
0
        public bool writeTestImage(string jylsh, string jyjgbh, string jcxdh, string jycs, string hphm, string hpzl, string clsbdh, string filePath, string pssj, string jyxm, string zpzl, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = jylsh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = jylsh;
                XmlElement xe104 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe104.InnerText = jylsh;
                XmlElement xe105 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe105.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe106 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe106.InnerText = hpzl;
                XmlElement xe107 = xmldoc.CreateElement("clsbdh");    //创建一个<Node>节点
                xe107.InnerText = clsbdh;
                XmlElement xe108 = xmldoc.CreateElement("pssj");      //创建一个<Node>节点
                xe108.InnerText = jylsh;
                XmlElement xe109 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe109.InnerText = jylsh;
                XmlElement xe110 = xmldoc.CreateElement("zpzl");      //创建一个<Node>节点
                xe110.InnerText = jylsh;
                XmlElement xe111 = xmldoc.CreateElement("zp");        //创建一个<Node>节点
                xe111.InnerText = XmlOperation.PushTxt(filePath);
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe109);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("GetVehicleInf_Send:  XTLB:" + Xtlb + "|JKXLH:" + Jkxlh + "|JKID:18C63\r\n" + XmlOperation.removePictureInfo(send_xml, new string[1] {
                    @"<zp>"
                }, new string[1] {
                    @"</zp>"
                }) + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.writeObjectOut(Xtlb, Jkxlh, "18C63", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleInf_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="is_start"></param>
        /// <param name="jylsh"></param>
        /// <param name="sbbh"></param>
        /// <param name="jycs"></param>
        /// <param name="jyxm"></param>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="vin"></param>
        /// <param name="sj"></param>
        /// <returns></returns>
        public bool SendProjectStartOrStop(bool is_start, string jylsh, string sbbh, string jycs, string jyxm, string hphm, string hpzl, string vin, DateTime sj)
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");                   //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("vehispara");                 //创建一个<Node>节点

                XmlElement xe11 = xmldoc.CreateElement("jyjgbh");                    //创建一个<Node>节点
                xe11.InnerText = station_id;
                XmlElement xe12 = xmldoc.CreateElement("jcxdh");                     //创建一个<Node>节点
                xe12.InnerText = line_id;
                XmlElement xe13 = xmldoc.CreateElement("gwjysbbh");                  //创建一个<Node>节点
                xe13.InnerText = sbbh;
                XmlElement xe14 = xmldoc.CreateElement("jylsh");                     //创建一个<Node>节点
                xe14.InnerText = jylsh;
                XmlElement xe15 = xmldoc.CreateElement("jycs");                      //创建一个<Node>节点
                xe15.InnerText = jycs;
                XmlElement xe16 = xmldoc.CreateElement("jyxm");                      //创建一个<Node>节点
                xe16.InnerText = jyxm;
                XmlElement xe17 = xmldoc.CreateElement("hphm");                      //创建一个<Node>节点
                xe17.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe18 = xmldoc.CreateElement("hpzl");                      //创建一个<Node>节点
                xe18.InnerText = hpzl;
                XmlElement xe19 = xmldoc.CreateElement("clsbdh");                    //创建一个<Node>节点
                xe19.InnerText = vin;
                XmlElement xe110 = xmldoc.CreateElement(is_start ? "kssj" : "jssj"); //创建一个<Node>节点
                xe110.InnerText = sj.ToString("yyyy-MM-dd HH:mm:ss");
                XmlElement xe111 = xmldoc.CreateElement("sqip");                     //创建一个<Node>节点
                xe111.InnerText = local_ip;

                xe1.AppendChild(xe11);
                xe1.AppendChild(xe12);
                xe1.AppendChild(xe13);
                xe1.AppendChild(xe14);
                xe1.AppendChild(xe15);
                xe1.AppendChild(xe16);
                xe1.AppendChild(xe17);
                xe1.AppendChild(xe18);
                xe1.AppendChild(xe19);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("SendProjectStartOrStop_Send:   " + (is_start ? "开始:18C55" : "结束:18C58") + "\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(upload_interface.writeObjectOut(xtlb, jkxlh, (is_start ? "开始:18C55" : "结束:18C58"), send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                string code, message;
                if (XmlOperation.ReadACKString(receiveXml, out code, out message) && code == "1")
                {
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("写入项目" + (is_start ? "开始" : "结束") + "失败:\r\n" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("SendProjectStartOrStop_Send_Error: " + (is_start ? "开始" : "结束") + "\r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #17
0
        /// <summary>
        /// 101115——上传检测结果详细信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writetestDetailResult(KsbtestDetailResult model, out string code, out string message)
        {
            code    = "";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root  = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1   = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点
                XmlElement xe101 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe101.InnerText = model.jylsh;
                XmlElement xe102 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe102.InnerText = model.jyjgbh;
                XmlElement xe103 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe103.InnerText = model.jcxdh;
                XmlElement xe104 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe104.InnerText = model.jyxm;
                XmlElement xe105 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe105.InnerText = model.jycs;

                XmlElement xe106 = xmldoc.CreateElement("hpzl");     //创建一个<Node>节点
                xe106.InnerText = model.hpzl;
                XmlElement xe107 = xmldoc.CreateElement("hphm");     //创建一个<Node>节点
                xe107.InnerText = XmlOperation.encodeUTF8(model.hphm);
                XmlElement xe108 = xmldoc.CreateElement("clsbdh");   //创建一个<Node>节点
                xe108.InnerText = model.clsbdh;
                XmlElement xe110 = xmldoc.CreateElement("gwjysbbh"); //创建一个<Node>节点
                xe110.InnerText = model.gwjysbbh;

                XmlElement xe111 = xmldoc.CreateElement("cwkc");     //创建一个<Node>节点
                xe111.InnerText = model.cwkc;
                XmlElement xe112 = xmldoc.CreateElement("cwkk");     //创建一个<Node>节点
                xe112.InnerText = model.cwkk;
                XmlElement xe113 = xmldoc.CreateElement("cwkg");     //创建一个<Node>节点
                xe113.InnerText = model.cwkg;
                XmlElement xe114 = xmldoc.CreateElement("clwkccpd"); //创建一个<Node>节点
                xe114.InnerText = model.clwkccpd;
                xe1.AppendChild(xe101);
                xe1.AppendChild(xe102);
                xe1.AppendChild(xe103);
                xe1.AppendChild(xe104);
                xe1.AppendChild(xe105);
                xe1.AppendChild(xe106);
                xe1.AppendChild(xe107);
                xe1.AppendChild(xe108);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                xe1.AppendChild(xe112);
                xe1.AppendChild(xe113);
                xe1.AppendChild(xe114);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writetestDetailResult_Send:  101115\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.UploadObjectOut(101115, send_xml, "null"));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                XmlOperation.ReadACKString(receiveXml, out code, out message);

                return(true);
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("writetestDetailResult_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #18
0
        public bool SendWKResult(string jylsh, string jycs, string jyxm, string length_bz, string width_bz, string height_bz,
                                 string length, string width, string height,
                                 string length_pd, string width_pd, string height_pd,
                                 string zbzlvalue, string clzbzlvalue, string zbzlpdvalue,
                                 string zhpd, string sqr)
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点

                XmlElement xe11 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe11.InnerText = station_id;
                XmlElement xe12 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe12.InnerText = line_id;
                XmlElement xe13 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe13.InnerText = jylsh;
                XmlElement xe14 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe14.InnerText = jycs;
                XmlElement xe15 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe15.InnerText = jyxm;
                XmlElement xe16 = xmldoc.CreateElement("bzcwkc");    //创建一个<Node>节点
                xe16.InnerText = length_bz;
                XmlElement xe17 = xmldoc.CreateElement("bzcwkk");    //创建一个<Node>节点
                xe17.InnerText = width_bz;
                XmlElement xe18 = xmldoc.CreateElement("bzcwkg");    //创建一个<Node>节点
                xe18.InnerText = height_bz;
                XmlElement xe19 = xmldoc.CreateElement("cwkc");      //创建一个<Node>节点
                xe19.InnerText = length;
                XmlElement xe110 = xmldoc.CreateElement("cwkk");     //创建一个<Node>节点
                xe110.InnerText = width;
                XmlElement xe111 = xmldoc.CreateElement("cwkg");     //创建一个<Node>节点
                xe111.InnerText = height;
                XmlElement xe112 = xmldoc.CreateElement("ccpd");     //创建一个<Node>节点
                xe112.InnerText = length_pd;
                XmlElement xe113 = xmldoc.CreateElement("ckpd");     //创建一个<Node>节点
                xe113.InnerText = width_pd;
                XmlElement xe114 = xmldoc.CreateElement("cgpd");     //创建一个<Node>节点
                xe114.InnerText = height_pd;
                XmlElement xe115 = xmldoc.CreateElement("clwkccpd"); //创建一个<Node>节点
                xe115.InnerText = zhpd;
                XmlElement xe116 = xmldoc.CreateElement("wjr");      //创建一个<Node>节点
                xe116.InnerText = XmlOperation.encodeUTF8(sqr);
                XmlElement xe117 = xmldoc.CreateElement("sqip");     //创建一个<Node>节点
                xe117.InnerText = local_ip;
                XmlElement zbzl = xmldoc.CreateElement("zbzl");      //创建一个<Node>节点
                zbzl.InnerText = zbzlvalue;
                XmlElement clzbzl = xmldoc.CreateElement("clzbzl");  //创建一个<Node>节点
                clzbzl.InnerText = clzbzlvalue;
                XmlElement zbzlpd = xmldoc.CreateElement("zbzlpd");  //创建一个<Node>节点
                zbzlpd.InnerText = zbzlpdvalue;
                XmlElement xe118 = xmldoc.CreateElement("hxnbcd");   //创建一个<Node>节点
                XmlElement xe119 = xmldoc.CreateElement("hxnbkd");   //创建一个<Node>节点
                XmlElement xe120 = xmldoc.CreateElement("hxnbgd");   //创建一个<Node>节点
                XmlElement xe121 = xmldoc.CreateElement("clzj");     //创建一个<Node>节点

                xe1.AppendChild(xe11);
                xe1.AppendChild(xe12);
                xe1.AppendChild(xe13);
                xe1.AppendChild(xe14);
                xe1.AppendChild(xe15);
                xe1.AppendChild(xe16);
                xe1.AppendChild(xe17);
                xe1.AppendChild(xe18);
                xe1.AppendChild(xe19);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                xe1.AppendChild(xe112);
                xe1.AppendChild(xe113);
                xe1.AppendChild(xe114);
                xe1.AppendChild(xe115);
                xe1.AppendChild(xe116);
                xe1.AppendChild(xe117);
                xe1.AppendChild(xe118);
                xe1.AppendChild(xe119);
                xe1.AppendChild(xe120);
                xe1.AppendChild(xe121);
                xe1.AppendChild(zbzl);
                xe1.AppendChild(clzbzl);
                xe1.AppendChild(zbzlpd);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("SendWKResult_Send:   18C81\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(upload_interface.writeObjectOut(xtlb, jkxlh, "18C81", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                string code, message;
                if (XmlOperation.ReadACKString(receiveXml, out code, out message) && code == "1")
                {
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("发送外廓检测结果失败:\r\n" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("SendWKResult_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
예제 #19
0
        public bool SendPhoto(string jylsh, string jycs, string jyxm, string hphm, string hpzl, string vin, DateTime pssj, string zpzl, string zp_path)
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");   //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("vehispara"); //创建一个<Node>节点

                XmlElement xe11 = xmldoc.CreateElement("jyjgbh");    //创建一个<Node>节点
                xe11.InnerText = station_id;
                XmlElement xe12 = xmldoc.CreateElement("jcxdh");     //创建一个<Node>节点
                xe12.InnerText = line_id;
                XmlElement xe13 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe13.InnerText = jylsh;
                XmlElement xe14 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe14.InnerText = jycs;
                XmlElement xe15 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe15.InnerText = jyxm;
                XmlElement xe16 = xmldoc.CreateElement("hphm");      //创建一个<Node>节点
                xe16.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe17 = xmldoc.CreateElement("hpzl");      //创建一个<Node>节点
                xe17.InnerText = hpzl;
                XmlElement xe18 = xmldoc.CreateElement("clsbdh");    //创建一个<Node>节点
                xe18.InnerText = vin;
                XmlElement xe19 = xmldoc.CreateElement("pssj");      //创建一个<Node>节点
                xe19.InnerText = pssj.ToString("yyyy-MM-dd HH:mm:ss");
                XmlElement xe110 = xmldoc.CreateElement("zpzl");     //创建一个<Node>节点
                xe110.InnerText = zpzl;
                XmlElement xe111 = xmldoc.CreateElement("zp");       //创建一个<Node>节点
                xe111.InnerText = XmlOperation.encodeUTF8(XmlOperation.PushTxt(zp_path));
                XmlElement xe112 = xmldoc.CreateElement("sqip");     //创建一个<Node>节点
                xe112.InnerText = local_ip;

                xe1.AppendChild(xe11);
                xe1.AppendChild(xe12);
                xe1.AppendChild(xe13);
                xe1.AppendChild(xe14);
                xe1.AppendChild(xe15);
                xe1.AppendChild(xe16);
                xe1.AppendChild(xe17);
                xe1.AppendChild(xe18);
                xe1.AppendChild(xe19);
                xe1.AppendChild(xe110);
                xe1.AppendChild(xe111);
                xe1.AppendChild(xe112);
                root.AppendChild(xe1);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("SendPhoto_Send:   18C63 (照片种类(" + zpzl + ")\r\n" + XmlOperation.removePictureInfo(send_xml, new string[1] {
                    @"<zp>"
                }, new string[1] {
                    @"</zp>"
                }) + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(upload_interface.writeObjectOut(xtlb, jkxlh, "18C63", send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                string code, message;
                if (XmlOperation.ReadACKString(receiveXml, out code, out message) && code == "1")
                {
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("发送照片(" + zpzl + ")失败:\r\n" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("SendPhoto_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }