Esempio n. 1
0
        /// <summary>
        /// 获取平台时间
        /// </summary>
        /// <param name="babh"></param>
        /// <returns></returns>
        public DataTable GetSystemDatetime(string babh)
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("babh");           //创建一个<Node>节点
                xe2.InnerText = babh;
                xe1.AppendChild(xe2);
                root.AppendChild(xe1);

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

                string receiveXml = HttpUtility.UrlDecode(outlineservice.queryObjectOut(Xtlb, Jkxlh, "18C50", Cjbh, Dwjgdm, Dwmc, Yhbz, Yhxm, Zdbs, send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                string code, msg;
                return(XmlOperation.ReadXmlToDatatable(receiveXml, out code, out msg));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetSystemDatetime_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 获取待检车辆信息
        /// </summary>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public DataTable GetVehicleInf(string hphm, string hpzl, 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("querycondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                xe2.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe3 = xmldoc.CreateElement("hpzl");            //创建一个<Node>节点
                xe3.InnerText = hpzl;
                xe1.AppendChild(xe2);
                xe1.AppendChild(xe3);
                root.AppendChild(xe1);

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

                string receiveXml = HttpUtility.UrlDecode(outlineservice.queryObjectXml("18C99", Jczdm, key, send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                return(ReadVehicleInfDatatable(receiveXml, out code, out message));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleInf_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 3
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);
            }
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="jylsh"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public DataTable GetTestResultBy18J17(string jylsh, out string code, out string message)
        {
            code    = "0";
            message = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("jylsh");          //创建一个<Node>节点
                xe2.InnerText = jylsh;
                xe1.AppendChild(xe2);
                root.AppendChild(xe1);

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

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

                return(XmlOperation.ReadXmlToDatatable(receiveXml, out code, out message));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetTestResultBy18J17_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 获取待检列表
        /// </summary>
        /// <returns></returns>
        public DataTable GetVehicleList()
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("jylsh");          //创建一个<Node>节点
                XmlElement xe3  = xmldoc.CreateElement("jyjgbh");         //创建一个<Node>节点
                XmlElement xe4  = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                XmlElement xe5  = xmldoc.CreateElement("hpzl");           //创建一个<Node>节点
                xe1.AppendChild(xe2);
                xe1.AppendChild(xe3);
                xe1.AppendChild(xe4);
                xe1.AppendChild(xe5);
                root.AppendChild(xe1);

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

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

                string code, msg;
                return(XmlOperation.ReadXmlToDatatable(receiveXml, out code, out msg));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleList_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 101104——项目开始命令
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writeProjectStart(KsbprojectStart 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 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("writeProjectStart_Send:  101104\r\n" + send_xml + "\r\n");

                string receiveXml = HttpUtility.UrlDecode(outlineservice.UploadObjectOut(101104, 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("writeProjectStart_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 7
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);
            }
        }
Esempio n. 8
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);
            }
        }
Esempio n. 9
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);
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 发送拍照命令
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public bool writeCapturePicture(AhcapturePicture model, out string code, out string message)
        {
            XmlDocument xmldoc;
            XmlElement  xmlelem;

            xmldoc  = new XmlDocument();
            xmlelem = xmldoc.CreateElement("", "root", "");
            xmldoc.AppendChild(xmlelem);
            XmlNode    root  = xmldoc.SelectSingleNode("root"); //查找<Employees>
            XmlElement xe1   = xmldoc.CreateElement("reqinfo"); //创建一个<Node>节点
            XmlElement xe101 = xmldoc.CreateElement("jylsh");   //创建一个<Node>节点

            xe101.InnerText = model.jylsh;
            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 xe110 = xmldoc.CreateElement("jyxm");//创建一个<Node>节点

            xe110.InnerText = model.jyxm;
            XmlElement xe111 = xmldoc.CreateElement("isFrontLeft");//创建一个<Node>节点

            xe111.InnerText = model.isFrontLeft;
            xe1.AppendChild(xe101);
            xe1.AppendChild(xe103);
            xe1.AppendChild(xe104);
            xe1.AppendChild(xe105);
            xe1.AppendChild(xe106);
            xe1.AppendChild(xe107);
            xe1.AppendChild(xe110);
            xe1.AppendChild(xe111);
            root.AppendChild(xe1);

            string xmlstring = XmlOperation.ConvertXmlToStringUTF8(xmldoc);

            IOControl.saveXmlLogInf("ReqCaptureOut_Send:请求抓拍照片 \r\n参数1-Jkxlh:" + Jkxlh + "|参数2-regXmlDoc:" + "\r\n" + xmlstring + "\r\n");
            string receiveXml = HttpUtility.UrlDecode(outlineservice.reqCaptureOut(Jkxlh, xmlstring));

            IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

            DataSet ds = new DataSet();

            ds      = XmlOperation.CXmlToDataSet(receiveXml);
            code    = ds.Tables["head"].Rows[0]["code"].ToString();
            message = ds.Tables["head"].Rows[0]["message"].ToString();
            return(code == "1");
        }
Esempio n. 11
0
        /// <summary>
        /// 写入外廓结果数据
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public bool writetestDetailResult(AhtestDetailResult model, out string code, out string message)
        {
            XmlDocument xmldoc;
            XmlElement  xmlelem;

            xmldoc  = new XmlDocument();
            xmlelem = xmldoc.CreateElement("", "root", "");
            xmldoc.AppendChild(xmlelem);
            XmlNode    root  = xmldoc.SelectSingleNode("root"); //查找<Employees>
            XmlElement xe1   = xmldoc.CreateElement("reqinfo"); //创建一个<Node>节点
            XmlElement xe101 = xmldoc.CreateElement("jylsh");   //创建一个<Node>节点

            xe101.InnerText = model.jylsh;
            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(xe103);
            xe1.AppendChild(xe104);
            xe1.AppendChild(xe105);
            xe1.AppendChild(xe111);
            xe1.AppendChild(xe112);
            xe1.AppendChild(xe113);
            xe1.AppendChild(xe114);
            root.AppendChild(xe1);

            string xmlstring = XmlOperation.ConvertXmlToStringUTF8(xmldoc);

            IOControl.saveXmlLogInf("ReqWriteCheckDataOut_Send:写检验结果详细数据 \r\n参数1-Jkxlh:" + Jkxlh + "|参数2-Jyxm:" + model.jyxm + "|参数3-regXmlDoc:" + "\r\n" + xmlstring + "\r\n");
            string receiveXml = HttpUtility.UrlDecode(outlineservice.reqWriteCheckDataOut(Jkxlh, model.jyxm, xmlstring));

            IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

            DataSet ds = new DataSet();

            ds      = XmlOperation.CXmlToDataSet(receiveXml);
            code    = ds.Tables["head"].Rows[0]["code"].ToString();
            message = ds.Tables["head"].Rows[0]["message"].ToString();
            return(code == "1");
        }
Esempio n. 12
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);
            }
        }
Esempio n. 13
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="jylsh"></param>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="vin"></param>
        /// <param name="dt_waitcar_info"></param>
        /// <param name="error_msg"></param>
        /// <returns></returns>
        public bool getVehicleInfo(string jylsh, string hphm, string hpzl, string vin, out DataTable dt_waitcar_info, out string error_msg)
        {
            dt_waitcar_info = new DataTable();
            error_msg       = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("QueryCondition"); //创建一个<Node>节点

                XmlElement xe11 = xmldoc.CreateElement("jyjgbh");         //创建一个<Node>节点
                xe11.InnerText = station_id;
                XmlElement xe12 = xmldoc.CreateElement("jylsh");          //创建一个<Node>节点
                xe12.InnerText = jylsh;
                XmlElement xe13 = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                xe13.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe14 = xmldoc.CreateElement("hpzl");           //创建一个<Node>节点
                xe14.InnerText = hpzl;
                XmlElement xe15 = xmldoc.CreateElement("clsbdh");         //创建一个<Node>节点
                xe15.InnerText = vin;
                XmlElement xe16 = xmldoc.CreateElement("sqip");           //创建一个<Node>节点
                xe16.InnerText = local_ip;

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

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

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

                string code, message;
                dt_waitcar_info = XmlOperation.ReadXmlToDatatable(receiveXml, out code, out message);
                if (dt_waitcar_info != null && code == "1")
                {
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("获取待检车辆信息失败:" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("getVehicleInfo_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 14
0
        /// <summary>
        /// 发送外廓尺寸结果数据
        /// </summary>
        /// <param name="jylsh"></param>
        /// <param name="jyxm"></param>
        /// <param name="jycs"></param>
        /// <param name="cwkc"></param>
        /// <param name="cwkk"></param>
        /// <param name="cwkg"></param>
        /// <param name="cwkbz"></param>
        /// <param name="cwkhg"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        public bool writeM1Result(string jylsh, string jyxm, string jycs, string cwkc, string cwkk, string cwkg, string cwkbz, string cwkhg, out int code, out string 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 xe11 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe11.InnerText = jylsh;
                XmlElement xe12 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe12.InnerText = jyxm;
                XmlElement xe13 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe13.InnerText = jycs;
                XmlElement xe14 = xmldoc.CreateElement("cwkc");      //创建一个<Node>节点
                xe14.InnerText = cwkc;
                XmlElement xe15 = xmldoc.CreateElement("cwkk");      //创建一个<Node>节点
                xe15.InnerText = cwkk;
                XmlElement xe16 = xmldoc.CreateElement("cwkg");      //创建一个<Node>节点
                xe16.InnerText = cwkg;
                XmlElement xe17 = xmldoc.CreateElement("cwkbz");     //创建一个<Node>节点
                xe17.InnerText = XmlOperation.encodeUTF8(cwkbz);
                XmlElement xe18 = xmldoc.CreateElement("cwkhg");     //创建一个<Node>节点
                xe18.InnerText = cwkhg == "合格" ? "O" : "X";
                XmlElement xe19 = xmldoc.CreateElement("tdh");       //创建一个<Node>节点
                xe19.InnerText = lineid;
                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);
                root.AppendChild(xe1);

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

                ReturnInfo receiveInf = outlineservice.writeObjectOut(jkxlh, "18C81", send_xml);
                code    = receiveInf.code;
                message = receiveInf.message;
                IOControl.saveXmlLogInf("Received:\r\nCode:" + code + "|Message:" + message + "|InfoXML:\r\n" + receiveInf.infoXML + "\r\n");

                return(true);
            }
            catch (Exception er)
            {
                code    = 0;
                message = "";
                IOControl.saveXmlLogInf("writeM1Result_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 上传外廓结果
        /// </summary>
        /// <param name="model"></param>
        /// <param name="code">1:成功 小于0:失败</param>
        /// <param name="message"></param>
        public bool writetestDetailResult(ZhtestDetailResult 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 xe110 = xmldoc.CreateElement("clwkccpd");  //创建一个<Node>节点
                xe110.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);
                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);
            }
        }
Esempio n. 16
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);
            }
        }
Esempio n. 17
0
        /// <summary>
        /// 发送照片
        /// </summary>
        /// <param name="jylsh"></param>
        /// <param name="jycs"></param>
        /// <param name="zpzl"></param>
        /// <param name="zp_path"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public bool writePicture(string jylsh, string jycs, string zpzl, string zp_path, out int code, out string 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 xe11 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe11.InnerText = jylsh;
                XmlElement xe12 = xmldoc.CreateElement("jycs");      //创建一个<Node>节点
                xe12.InnerText = jycs;
                XmlElement xe13 = xmldoc.CreateElement("zpzl");      //创建一个<Node>节点
                xe13.InnerText = zpzl;
                XmlElement xe14 = xmldoc.CreateElement("zp");        //创建一个<Node>节点
                if (zp_path != "")
                {
                    xe14.InnerText = XmlOperation.encodeUTF8(XmlOperation.PushTxt(zp_path));
                }
                else
                {
                    xe14.InnerText = "";
                }
                xe1.AppendChild(xe11);
                xe1.AppendChild(xe12);
                xe1.AppendChild(xe13);
                xe1.AppendChild(xe14);

                string send_xml = XmlOperation.ConvertXmlToStringUTF8(xmldoc);
                IOControl.saveXmlLogInf("writePicture_Send:  00C63\r\n" + XmlOperation.removePictureInfo(send_xml, new string[4] {
                    @"<zp>", @"<zp1>", @"<zp2>", @"<zp3>"
                }, new string[4] {
                    @"</zp>", @"</zp1>", @"</zp2>", @"</zp3>"
                }) + "\r\n");

                ReturnInfo receiveInf = outlineservice.writeObjectOut(jkxlh, "00C63", send_xml);
                code    = receiveInf.code;
                message = receiveInf.message;
                IOControl.saveXmlLogInf("Received:\r\nCode:" + code + "|Message:" + message + "|InfoXML:\r\n" + receiveInf.infoXML + "\r\n");

                return(true);
            }
            catch (Exception er)
            {
                code    = 0;
                message = "";
                IOControl.saveXmlLogInf("writePicture_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 18
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);
            }
        }
Esempio n. 19
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="clsbdh"></param>
        /// <param name="dly"></param>
        /// <param name="dlysfzh"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public DataTable GetVehicleInfBy18J52(string hphm, string hpzl, string clsbdh, string dly, string dlysfzh, 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("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                xe2.InnerText = hphm;
                XmlElement xe3 = xmldoc.CreateElement("hpzl");            //创建一个<Node>节点
                if (hpzl.Contains("("))
                {
                    xe3.InnerText = hpzl.Split('(')[1].Split(')')[0];
                }
                else
                {
                    xe3.InnerText = hpzl;
                }
                XmlElement xe4 = xmldoc.CreateElement("clsbdh");  //创建一个<Node>节点
                xe4.InnerText = clsbdh;
                XmlElement xe5 = xmldoc.CreateElement("dly");     //创建一个<Node>节点
                xe5.InnerText = dly;
                XmlElement xe6 = xmldoc.CreateElement("dlysfzh"); //创建一个<Node>节点
                xe6.InnerText = dlysfzh;
                xe1.AppendChild(xe2);
                xe1.AppendChild(xe3);
                xe1.AppendChild(xe4);
                xe1.AppendChild(xe5);
                xe1.AppendChild(xe6);
                root.AppendChild(xe1);

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

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

                return(XmlOperation.ReadXmlToDatatable(receiveXml, out code, out message));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleInfBy18J52_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 20
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);
            }
        }
Esempio n. 21
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);
            }
        }
Esempio n. 22
0
        public bool getSystemTime(string babh, out string systime)
        {
            systime = "";
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("babh");           //创建一个<Node>节点
                xe2.InnerText = babh;
                XmlElement xe3 = xmldoc.CreateElement("sqip");            //创建一个<Node>节点
                xe3.InnerText = local_ip;

                xe1.AppendChild(xe2);
                xe1.AppendChild(xe3);
                root.AppendChild(xe1);

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

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

                string    code, message;
                DataTable dt = XmlOperation.ReadXmlToDatatable(receiveXml, out code, out message);
                if (dt != null && code == "1")
                {
                    systime = dt.Rows[0]["sj"].ToString();
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("同步时间失败:" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("getSystemTime_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 23
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="jylb"></param>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="VIN"></param>
        /// <param name="jyjgbh"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public DataTable GetVehicleInfHN(string jylb, string hphm, string hpzl, string VIN, string jyjgbh, 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("querycondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                xe2.InnerText = XmlOperation.encodeUTF8(hphm);
                XmlElement xe3 = xmldoc.CreateElement("hpzl");            //创建一个<Node>节点
                xe3.InnerText = hpzl;
                XmlElement xe4 = xmldoc.CreateElement("clsbdh");          //创建一个<Node>节点
                xe4.InnerText = VIN;
                XmlElement xe5 = xmldoc.CreateElement("jyjgbh");          //创建一个<Node>节点
                xe5.InnerText = jyjgbh;
                XmlElement xe6 = xmldoc.CreateElement("jylb");            //创建一个<Node>节点
                xe6.InnerText = jylb;
                xe1.AppendChild(xe2);
                xe1.AppendChild(xe3);
                xe1.AppendChild(xe4);
                xe1.AppendChild(xe5);
                xe1.AppendChild(xe6);
                root.AppendChild(xe1);

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

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

                return(ReadVehicleInfDatatablehn(receiveXml, out code, out message));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleInfHN_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 24
0
        /// <summary>
        /// 发送项目开始
        /// </summary>
        /// <param name="jylsh"></param>
        /// <param name="jyxm"></param>
        /// <param name="tgbz"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        public bool writeProjectstart(string jylsh, string jyxm, string tgbz, out int code, out string 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 xe11 = xmldoc.CreateElement("jylsh");     //创建一个<Node>节点
                xe11.InnerText = jylsh;
                XmlElement xe12 = xmldoc.CreateElement("jyxm");      //创建一个<Node>节点
                xe12.InnerText = jyxm;
                XmlElement xe13 = xmldoc.CreateElement("tdh");       //创建一个<Node>节点
                xe13.InnerText = lineid;
                XmlElement xe14 = xmldoc.CreateElement("tgbz");      //创建一个<Node>节点
                xe14.InnerText = XmlOperation.encodeUTF8(tgbz);
                xe1.AppendChild(xe11);
                xe1.AppendChild(xe12);
                xe1.AppendChild(xe13);
                xe1.AppendChild(xe14);
                root.AppendChild(xe1);

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

                ReturnInfo receiveInf = outlineservice.writeObjectOut(jkxlh, "18C55", send_xml);
                code    = receiveInf.code;
                message = receiveInf.message;
                IOControl.saveXmlLogInf("Received:\r\nCode:" + code + "|Message:" + message + "|InfoXML:\r\n" + receiveInf.infoXML + "\r\n");

                return(true);
            }
            catch (Exception er)
            {
                code    = 0;
                message = "";
                IOControl.saveXmlLogInf("writeProjectstart_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 25
0
        /// <summary>
        /// 18C50 同步系统时间
        /// </summary>
        /// <param name="babh">备案编号</param>
        /// <param name="sys_time">系统时间</param>
        /// <returns>是否成功</returns>
        public bool GetSystemDatetime(string babh, ref DateTime sys_time)
        {
            try
            {
                XmlDocument xmldoc  = new XmlDocument();
                XmlElement  xmlelem = xmldoc.CreateElement("", "root", "");
                xmldoc.AppendChild(xmlelem);
                XmlNode    root = xmldoc.SelectSingleNode("root");        //查找<Employees>
                XmlElement xe1  = xmldoc.CreateElement("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("babh");           //创建一个<Node>节点
                xe2.InnerText = babh;
                xe1.AppendChild(xe2);
                root.AppendChild(xe1);

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

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

                string    code, message;
                DataTable dt = XmlOperation.ReadXmlToDatatable(receiveXml, out code, out message);
                if (dt.Rows.Count > 0)
                {
                    sys_time = DateTime.Parse(dt.Rows[0]["sj"].ToString());
                    return(true);
                }
                else
                {
                    IOControl.saveXmlLogInf("GetSystemDatetime_Send_Failed: \r\n" + message + "\r\n");
                    return(false);
                }
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetSystemDatetime_Send_Error: \r\n" + er.Message + "\r\n");
                return(false);
            }
        }
Esempio n. 26
0
        /// <summary>
        /// 获取待检车辆信息
        /// </summary>
        /// <param name="hphm"></param>
        /// <param name="hpzl"></param>
        /// <param name="clsbdh"></param>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public DataTable GetVehicleInf(string hphm, string hpzl, string clsbdh, 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("QueryCondition"); //创建一个<Node>节点
                XmlElement xe2  = xmldoc.CreateElement("hphm");           //创建一个<Node>节点
                xe2.InnerText = hphm;
                XmlElement xe3 = xmldoc.CreateElement("hpzl");            //创建一个<Node>节点
                xe3.InnerText = hpzl;
                XmlElement xe4 = xmldoc.CreateElement("clsbdh");          //创建一个<Node>节点
                xe4.InnerText = clsbdh;
                XmlElement xe5 = xmldoc.CreateElement("jyjgbh");          //创建一个<Node>节点
                xe5.InnerText = Jyjgbh;
                xe1.AppendChild(xe2);
                xe1.AppendChild(xe3);
                xe1.AppendChild(xe4);
                xe1.AppendChild(xe5);
                root.AppendChild(xe1);

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

                string receiveXml = HttpUtility.UrlDecode(outlineservice.queryObjectOut(Xtlb, Jkxlh, "18S02", Cjbh, Dwjgdm, Dwmc, Yhbz, Yhxm, Zdbs, send_xml));
                IOControl.saveXmlLogInf("Received:\r\n" + receiveXml + "\r\n");

                return(XmlOperation.ReadXmlToDatatable(receiveXml, out code, out message));
            }
            catch (Exception er)
            {
                IOControl.saveXmlLogInf("GetVehicleInf_Send_Error: \r\n" + er.Message + "\r\n");
                return(null);
            }
        }
Esempio n. 27
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);
            }
        }
Esempio n. 28
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);
            }
        }
Esempio n. 29
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);
            }
        }
Esempio n. 30
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);
            }
        }