Beispiel #1
0
        public static string url = "http://yinge.eg66.com/WS3/egws.asmx";//网通http://wangtong.eg66.com/WS3/egws.asmx
        public static string getUndecfeePnr(string userAccount)
        {
            try
            {
                WS.egws w  = new WS.egws(services.url);
                NewPara np = new NewPara();
                np.AddPara("cm", "GetUnPayPnr");
                np.AddPara("UserName", userAccount);
                string send = np.GetXML();
                string recv = w.getEgSoap(send);
                if (recv == "")
                {
                    throw new Exception("不能从服务器取到未扣款PNR");
                }
                NewPara n  = new NewPara(recv);
                string  cm = n.FindTextByPath("//eg/cm");
                if (cm != "RetUnPayPnr")
                {
                    throw new Exception(cm);
                }
                return(n.FindTextByPath("//eg/Pnrs"));
            }
            catch (Exception ex)
            {
                GlobalApi.appenderrormessage("同步错误:" + ex.Message);
            }

            return("");
        }
Beispiel #2
0
 public string getpnr()
 {
     try
     {
         EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
         NewPara np = new NewPara();
         np.AddPara("cm", "GetUncheckedPNR");
         np.AddPara("UserID", GlobalVar.loginName);
         string strReq = np.GetXML();
         string strRet = ws.getEgSoap(strReq);
         if (strRet != "")
         {
             NewPara np1 = new NewPara(strRet);
             if (np1.FindTextByPath("//eg/cm") == "RetGetUncheckedPNR" && np1.FindTextByPath("//eg/Pnr") != "")
             {
                 return(np1.FindTextByPath("//eg/Pnr"));
             }
         }
         else
         {
             //System.Windows.Forms.MessageBox.Show("GetUncheckedPNR与服务器数据库连接失败!");
         }
     }
     catch
     {
     }
     return("");
 }
Beispiel #3
0
        public static void LogServerWrite(object args)
        {
            try
            {
                string[] obj = ((string)args).Split(new string[] { "<eg66>" }, StringSplitOptions.RemoveEmptyEntries);
                string   cmd = obj[0];
                string   rr  = obj[1];

                EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
                NewPara np = new NewPara();
                np.AddPara("cm", "WriteLog");
                np.AddPara("User", GlobalVar.loginName);
                np.AddPara("Cmd", cmd);
                np.AddPara("ReturnResult", rr);
                string strReq = np.GetXML();
                while (true)
                {
                    string strRet = ws.getEgSoap(strReq);
                    if (strRet != "")
                    {
                        NewPara np1 = new NewPara(strRet);
                        if (np1.FindTextByPath("//eg/cm") == "RetWriteLog" && np1.FindTextByPath("//eg/OperationFlag") == "SaveSucc")
                        {
                            return;
                        }
                    }
                }
            }
            catch
            {
                //MessageBox.Show("FN项提交失败");
            }
        }
Beispiel #4
0
        public string insertTicketInfo(string bfrom, string eto, string bunkf, string bunky)//添加
        {
            NewPara     np  = new NewPara();
            XmlDocument doc = np.getRoot();

            np.AddPara("cm", "ret_insertTicketInfo");
            string strSql = "";
            string strRet = "";
            Conn   cn     = null;

            try
            {
                cn     = new Conn();
                strSql = "INSERT INTO eg_ticketInfo (BFROM, ETO, BUNKF, BUNKY) VALUES ('" + bfrom + "', '" + eto + "', '" + bunkf + "', '" + bunky + "')";
                if (cn.Update(strSql))
                {
                    strRet = "true";
                }
                else
                {
                    strRet = "false";
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("insertTicketInfo is err sql=" + strSql + ex.Message);
                throw ex;
            }
            finally
            {
                cn.close();
            }
            np.AddPara("ret", strRet);
            return(np.GetXML());
        }
Beispiel #5
0
        public string updateTicketInfo(string bfrom, string eto, string bunkf, string bunky)//更新
        {
            NewPara     np  = new NewPara();
            XmlDocument doc = np.getRoot();

            np.AddPara("cm", "ret_updateTicketInfo");
            string strSql = "";
            string strRet = "";
            Conn   cn     = null;

            try
            {
                cn     = new Conn();
                strSql = "UPDATE eg_ticketInfo SET BUNKF = '" + bunkf + "', BUNKY = '" + bunky + "' WHERE (BFROM = '" + bfrom + "') AND (ETO = '" + eto + "')";
                if (cn.Update(strSql))
                {
                    strRet = "true";
                }
                else
                {
                    strRet = "false";
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("updateTicketInfo is err sql=" + strSql + ex.Message);
                throw ex;
            }
            finally
            {
                cn.close();
            }
            np.AddPara("ret", strRet);
            return(np.GetXML());
        }
Beispiel #6
0
        public string getAllPolicyCity()//得到所有的城市
        {
            NewPara     np  = new NewPara();
            XmlDocument doc = np.getRoot();

            np.AddPara("cm", "ret_getAllPolicyCity");
            string strSql = "";
            string strRet = "";
            Conn   cn     = null;

            try
            {
                cn     = new Conn();
                strSql = "SELECT vcCityCode FROM eg_PolicyCity ";
                DataSet ds = cn.GetDataSet(strSql);
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    strRet += (ds.Tables[0].Rows[i]["vcCityCode"].ToString().Trim() + ";");
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("getAllPolicyCity is err sql=" + strSql + ex.Message);
                throw ex;
            }
            finally
            {
                cn.close();
            }
            np.AddPara("Citys", strRet);
            return(np.GetXML());
        }
Beispiel #7
0
 public bool submitinfo()
 {
     try
     {
         EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
         NewPara np = new NewPara();
         np.AddPara("cm", "CheckReceiptNumber");
         np.AddPara("User", GlobalVar.loginName);
         np.AddPara("RecieptNumber", varreceiptnumber);
         string strReq = np.GetXML();
         string strRet = ws.getEgSoap(strReq);
         if (strRet != "")
         {
             NewPara np1 = new NewPara(strRet);
             if (np1.FindTextByPath("//eg/cm") == "RetCheckRecieptNumber" && np1.FindTextByPath("//eg/OperationFlag") == "TRUE")
             {
                 return(true);
             }
         }
         else
         {
             //System.Windows.Forms.MessageBox.Show("CheckReceiptNumber与服务器数据库连接失败!");
             MessageBox.Show("CheckReceiptNumber与服务器数据库连接失败!", "易格服务器错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch
     {
     }
     return(false);
 }
Beispiel #8
0
 public static bool decfee(string pnr, string money)
 {
     try
     {
         WS.egws ws = new WS.egws(url);
         NewPara np = new NewPara();
         np.AddPara("cm", "DecFee2");
         np.AddPara("Pnr", pnr);
         np.AddPara("TicketPrice", money);
         string  strReq  = np.GetXML();
         string  strRet  = ws.getEgSoap(strReq);
         NewPara np1     = new NewPara(strRet);
         string  cm      = np1.FindTextByPath("//eg/cm");
         string  decstat = np1.FindTextByPath("//eg/DecStat");
         string  m       = np1.FindTextByPath("//eg/NewUserYe");
         if (cm == "RetDecFee2" && decstat == "DecSucc")
         {
             GlobalApi.appenderrormessage(string.Format("--->同步扣款成功:PNR={0},MONEY={1}", pnr, money));
             return(true);
         }
     }
     catch (Exception ex)
     {
         GlobalApi.appenderrormessage("同步错误:" + ex.Message);
     }
     return(false);
 }
Beispiel #9
0
        /// <summary>
        /// 根据客户来电记录查找客户资料
        /// </summary>
        /// <param name="p_strMobileNo"></param>
        /// <returns></returns>
        public string getCustInfoByMobile(string p_strMobileNo)
        {
            DataSet ds = null;
            Conn    cn = null;

            try
            {
                cn = new Conn();
                string strSql = "SELECT dbo.eg_CustIdent.vcIdentType, dbo.eg_CustMemSrc.vcMenSrcDesc, dbo.eg_CustType.vcCustType, dbo.eg_Custer.*,dbo.getAgentName(eg_Custer.numAgentId) as vcNewAgentName " +
                                " FROM dbo.eg_Custer  LEFT OUTER JOIN dbo.eg_CustType ON dbo.eg_Custer.numCustType = dbo.eg_CustType.numCustTypeId LEFT OUTER JOIN dbo.eg_CustMemSrc ON dbo.eg_Custer.numMemSrc = dbo.eg_CustMemSrc.numMemSrcId  LEFT OUTER JOIN dbo.eg_CustIdent ON dbo.eg_Custer.numIdentType = dbo.eg_CustIdent.numIdentType " +
                                " where vcMobile='" + p_strMobileNo + "'";         //
                //gs.util.func.Write(strSql);
                ds = cn.GetDataSet(strSql);
            }
            catch (Exception ex)
            {
                gs.util.func.Write("logic.getCustInfoByMobile is err" + ex.Message);
            }
            finally
            {
                cn.close();
            }

            NewPara npRet = new NewPara();

            npRet.AddPara("cm", "RetCustInfoByMobile");           //返回消息

            if (ds.Tables[0].Rows.Count > 0)
            {
                npRet.AddPara("bExistCust", "true");
                npRet.AddPara("numCustId", ds.Tables[0].Rows[0]["numCustId"].ToString().Trim());
                npRet.AddPara("vcCustNo", ds.Tables[0].Rows[0]["vcCustNo"].ToString().Trim());
                npRet.AddPara("vcCustName", ds.Tables[0].Rows[0]["vcCustName"].ToString().Trim());
                npRet.AddPara("vcTel", ds.Tables[0].Rows[0]["vcTel"].ToString().Trim());
                npRet.AddPara("vcIdentCard", ds.Tables[0].Rows[0]["vcIdentCard"].ToString().Trim());
                npRet.AddPara("vcIdentType", ds.Tables[0].Rows[0]["vcIdentType"].ToString().Trim());
                npRet.AddPara("vcCustType", ds.Tables[0].Rows[0]["vcCustType"].ToString().Trim());
                npRet.AddPara("vcMenSrcDesc", ds.Tables[0].Rows[0]["vcMenSrcDesc"].ToString().Trim());
                npRet.AddPara("numMemScore", ds.Tables[0].Rows[0]["numMemScore"].ToString().Trim());
                npRet.AddPara("dtCustBuildTime", ds.Tables[0].Rows[0]["dtCustBuildTime"].ToString().Trim());
                npRet.AddPara("dtLastFee", ds.Tables[0].Rows[0]["dtLastFee"].ToString().Trim());
                npRet.AddPara("numAgentId", ds.Tables[0].Rows[0]["numAgentId"].ToString().Trim());
                npRet.AddPara("vcInpEgUser", ds.Tables[0].Rows[0]["vcInpEgUser"].ToString().Trim());
                npRet.AddPara("vcNewAgentName", ds.Tables[0].Rows[0]["vcNewAgentName"].ToString().Trim());
                npRet.AddPara("vcCustAdr", ds.Tables[0].Rows[0]["vcCustAdr"].ToString().Trim());
                npRet.AddPara("dtBirthDay", ds.Tables[0].Rows[0]["dtBirthDay"].ToString().Trim());
                npRet.AddPara("vcCredCardOne", ds.Tables[0].Rows[0]["vcCredCardOne"].ToString().Trim());
            }
            else
            {
                npRet.AddPara("bExistCust", "false");
            }

            return(npRet.GetXML());
        }
Beispiel #10
0
        public string GetReceiptSaleCodeFromXML()
        {
            FileStream   fs   = new FileStream(filename, FileMode.Open, FileAccess.Read);
            StreamReader sr   = new StreamReader(fs, Encoding.Default);
            string       temp = sr.ReadToEnd();

            sr.Close();
            fs.Close();
            gs.para.NewPara np = new NewPara(temp);
            return(np.FindTextByPath("//eg/SaleCode"));
        }
Beispiel #11
0
        public string GetXiaoShouDaiHao(string on)
        {
            FileStream   fs   = new FileStream(filename, FileMode.Open, FileAccess.Read);
            StreamReader sr   = new StreamReader(fs, Encoding.Default);
            string       temp = sr.ReadToEnd();

            sr.Close();
            fs.Close();
            gs.para.NewPara np = new NewPara(temp);
            return(np.FindTextByPath("//eg/" + on));
        }
Beispiel #12
0
        public string TerminalNumber = "0";//使用IP的ID

        public bool SubmitInfo()
        {
            try
            {
                EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
                NewPara np = new NewPara();
                np.AddPara("cm", "SubmitETicket");
                //if (UserID != "") np.AddPara("UserID", GlobalVar.loginName);
                np.AddPara("etNumber", etNumber);
                np.AddPara("FlightNumber1", FlightNumber1);
                np.AddPara("Bunk1", Bunk1);
                np.AddPara("CityPair1", CityPair1);
                np.AddPara("Date1", Date1);

                np.AddPara("FlightNumber2", FlightNumber2);
                np.AddPara("Bunk2", Bunk2);
                np.AddPara("CityPair2", CityPair2);
                np.AddPara("Date2", Date2);

                np.AddPara("TotalFC", TotalFC);

                np.AddPara("State", State);
                np.AddPara("Pnr", Pnr);
                //np.AddPara("DecFeeState",  "2");//服务器应不予以处理,在客户端取消

                np.AddPara("Passenger", Passengers);

                np.AddPara("numBasePrc", TotalTaxBuild);
                np.AddPara("numFuel", TotalTaxFuel);
                //np.AddPara("IpId", TerminalNumber);
                np.AddPara("IpId", "");

                string strReq = np.GetXML();
                string strRet = ws.getEgSoap(strReq);
                if (strRet != "")
                {
                    NewPara np1 = new NewPara(strRet);
                    if (np1.FindTextByPath("//eg/cm") == "RetSubmitETicket" && np1.FindTextByPath("//eg/OperationFlag") == "SaveSucc")
                    {
                        return(true);
                    }
                }
                else
                {
                    //System.Windows.Forms.MessageBox.Show("SubmitETicket与服务器数据库连接失败!");
                    MessageBox.Show("SubmitETicket与服务器数据库连接失败!", "易格服务器错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch
            {
            }
            return(false);
        }
Beispiel #13
0
        /// <summary>
        /// 执行扣款
        /// </summary>
        /// <returns></returns>
        private void DoDecFee()
        {
            string strRet = "";

            if (CalcFee())
            {
                if (foOriginallyBalance < foMuPaFee)
                {
                    throw new Exception("\r\n该用户余额不足,不能出票!\r\n>");
                }
                strRet = InvokeWS();
                //strRet = "<eg><cm>RetDecFee</cm><DecStat>DecSucc</DecStat><NewUserYe>300</NewUserYe></eg>";
            }
            else
            {
                //throw new Exception("\r\n计算多人总票价出错!\r\n>");
                EagleAPI.LogWrite("\r\n计算多人总票价出错!\r\n");
                DoEtdz();
            }
            if (strRet == null || strRet == "")
            {
                throw new Exception("\r\n调用 WebService 返回不正常!xml:" + strRet + "\r\n>");
            }
            NewPara np1     = new NewPara(strRet);
            string  cm      = np1.FindTextByPath("//eg/cm");
            string  decstat = np1.FindTextByPath("//eg/DecStat");
            string  money   = np1.FindTextByPath("//eg/NewUserYe");
            string  err     = np1.FindTextByPath("//eg/err");

            if (cm == "RetDecFee" && decstat == "DecSucc")
            {
                GlobalVar.f_CurMoney = money;
                foCurrentBalance     = float.Parse(money);
                string agrs = "\r\n调用扣款服务" + "<eg66>" + strPnr;
                strProResult  = "\r\n系统开始减款,用户原始余额:" + foOriginallyBalance.ToString("G") + "扣款:" + foMuPaFee.ToString("G");
                strProResult += "\r\n" + "用户当前余额:" + foCurrentBalance.ToString("G") + "\r\n";

                EagleAPI.LogWrite(agrs + strProResult);
                GlobalVar.b_NotDoDec = true;//先扣款成功
                DoEtdz();
            }
            else
            {
                //if (cm == "RetDecFee" && decstat == "Deced")
                //{
                //}
                //else
                //{
                EagleAPI.LogWrite("cm:" + cm + " err:" + err + "\r\n>");
                DoEtdz();
                //}
            }
        }
Beispiel #14
0
        /// <summary>
        /// 调用扣款Web服务
        /// </summary>
        private string InvokeWS()
        {
            EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
            NewPara np = new NewPara();

            np.AddPara("cm", "DecFee");
            np.AddPara("Pnr", strPnr);
            np.AddPara("TicketPrice", strMuPaFee);
            string strReq = np.GetXML();
            string strRet = ws.getEgSoap(strReq);

            return(strRet);
        }
Beispiel #15
0
        /// <summary>
        /// 新增客户来电记录
        /// </summary>
        /// <param name="p_strXml"></param>
        /// <returns></returns>
        public string NewCustCallRec(string p_strXml)
        {
            NewPara npRet = new NewPara();

            string  strRet = "fail";
            NewPara npCust = new NewPara(p_strXml);

            string strCustId   = npCust.FindTextByPath("//eg/numCustId").Trim();
            string strMobileNo = npCust.FindTextByPath("//eg/MobileNo").Trim();

            string strErr = "";
            Conn   cn     = null;

            try
            {
                cn = new Conn();


                string strSql = "select * from eg_Custer where numCustId=" + strCustId;

                DataSet ds = cn.GetDataSet(strSql);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    string strIns = "insert into eg_CustCallRec(numCustId,vcCallNo) values(" + strCustId + ",'" + strMobileNo + "')";
                    cn.Update(strIns);
                    strRet = "succ";
                }
                else
                {
                    strRet = "NoCust";
                }
            }
            catch (Exception ex)
            {
                strErr = "新增客户来电记录失败" + ex.Message;
                gs.util.func.Write("logic.Custer.NewCustCallRec is err 新增客户来电失败" + ex.Message);
                throw ex;
            }
            finally
            {
                cn.close();
            }

            npRet.AddPara("cm", "RetNewCustCallRec");           //返回消息
            npRet.AddPara("Flag", strRet);
            npRet.AddPara("Mes", strErr);

            return(npRet.GetXML());
        }
Beispiel #16
0
        /// <summary>
        /// 调用扣款Web服务
        /// </summary>
        private string InvokeWS()
        {
            EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
            NewPara np = new NewPara();

            np.AddPara("cm", "DecFee");
            np.AddPara("Pnr", strPnr);
            np.AddPara("TicketPrice", foMuPaFee.ToString());
            string strReq = np.GetXML();
            string strRet = ws.getEgSoap(strReq);

            GlobalVar.f_Balance -= (decimal)(foMuPaFee);
            EagleAPI.LogWrite(strPnr + " DecFee 先扣款成功!\r\n");
            return(strRet);
        }
Beispiel #17
0
        public void GetConfig()
        {
            FileStream   fs   = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.Read);
            StreamReader sr   = new StreamReader(fs, Encoding.Default);
            string       temp = sr.ReadToEnd();

            sr.Close();
            fs.Close();
            NewPara np = new NewPara(temp);

            this.textBox1.Text        = np.FindTextByPath("//eg/" + xmlFirst + "/ENumberHead");
            this.textBox2.Text        = np.FindTextByPath("//eg/" + xmlFirst + "/Signature");
            this.numericUpDownX.Value = int.Parse(np.FindTextByPath("//eg/" + xmlFirst + "/OffsetX"));
            this.numericUpDownY.Value = int.Parse(np.FindTextByPath("//eg/" + xmlFirst + "/OffsetY"));
        }
Beispiel #18
0
        public void GetConfig()
        {
            FileStream   fs   = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.Read);
            StreamReader sr   = new StreamReader(fs, Encoding.Default);
            string       temp = sr.ReadToEnd();

            sr.Close();
            fs.Close();
            NewPara np = new NewPara(temp);

            eNumberHead = np.FindTextByPath("//eg/NewChina/ENumberHead");
            Signature   = np.FindTextByPath("//eg/NewChina/Signature");
            OffsetX     = int.Parse(np.FindTextByPath("//eg/NewChina/OffsetX"));
            OffsetY     = int.Parse(np.FindTextByPath("//eg/NewChina/OffsetY"));
            SaveNo      = np.FindTextByPath("//eg/NewChina/SaveNo");
        }
Beispiel #19
0
        /// <summary>
        /// 执行扣款
        /// </summary>
        /// <returns></returns>
        private void DoDecFee()
        {
            string strRet = "";

            if (CalcFee())
            {
                if (Convert.ToInt32(this.strOriginallyBalance) < Convert.ToInt32(this.strMuPaFee))
                {
                    throw new Exception("\r\n该用户余额不足,不能出票!\r\n>");
                }
                strRet = InvokeWS();
            }
            else
            {
                throw new Exception("\r\n计算多人总票价出错!\r\n>");
            }
            if (strRet == null || strRet == "")
            {
                throw new Exception("\r\n调用 WebService 返回不正常!xml:" + strRet + "\r\n>");
            }
            NewPara np1     = new NewPara(strRet);
            string  cm      = np1.FindTextByPath("//eg/cm");
            string  decstat = np1.FindTextByPath("//eg/DecStat");
            string  money   = np1.FindTextByPath("//eg/NewUserYe");
            string  err     = np1.FindTextByPath("//eg/err");

            if (cm == "RetDecFee" && decstat == "DecSucc")
            {
                strCurrentBalance = GlobalVar.f_CurMoney = money;
                string agrs = "\r\n调用扣款服务" + "<eg66>" + strPnr;
                strProResult      = "\r\n系统开始减款,用户原始余额:" + strOriginallyBalance + "扣款:" + strMuPaFee;
                strProResult     += "\r\n" + "用户当前余额:" + strCurrentBalance + "\r\n";
                GlobalVar.b_netdz = true;
                DoEtdz();
                EagleAPI.LogWrite(agrs + strProResult);
            }
            else
            {
                //if (cm == "RetDecFee" && decstat == "Deced")
                //{
                //}
                //else
                //{
                throw new Exception("cm:" + cm + " err:" + err + Environment.NewLine);
                //}
            }
        }
Beispiel #20
0
        public static string XlsAutoImport(string username, DateTime start, DateTime stop)
        {
            WS.egws ws = new WS.egws(url);
            NewPara np = new NewPara();

            np.AddPara("cm", "GetEticketExcel");
            np.AddPara("user", username);
            np.AddPara("startdate", start.ToShortDateString());
            np.AddPara("enddate", stop.AddDays(1).ToShortDateString());
            string strReq = np.GetXML();
            string strRet = ws.getEgSoap(strReq);
            //<eg><cm>ReGetEticketExcel</cm><result>E:\www\Excel\claw2009-1-15.xls<result></eg>
            NewPara np1 = new NewPara(strRet);
            string  ret = np1.FindTextByPath("//eg/result");

            return(ret);
        }
Beispiel #21
0
        public bool submitinfo()
        {
            try
            {
                if (float.Parse(TotalFC) < 10.0F)
                {
                    return(false);
                }
                EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
                NewPara np = new NewPara();
                np.AddPara("cm", "DecFee");
                np.AddPara("Pnr", Pnr);
                np.AddPara("TicketPrice", TotalFC);
                string strReq = np.GetXML();
                string strRet = ws.getEgSoap(strReq);
                //DecFee_Class dc = new DecFee_Class(strRet);
                if (strRet == null || strRet == "")
                {
                    throw new Exception("调用 WebService 返回不正常!xml:" + strRet + Environment.NewLine);
                }

                NewPara np1     = new NewPara(strRet);
                string  cm      = np1.FindTextByPath("//eg/cm");
                string  decstat = np1.FindTextByPath("//eg/DecStat");
                string  money   = np1.FindTextByPath("//eg/NewUserYe");
                string  err     = np1.FindTextByPath("//eg/err");

                if (cm == "RetDecFee" && decstat == "DecSucc")
                {
                    GlobalVar.f_CurMoney = money;
                    string agrs = "调用扣款服务" + "<eg66>" + Pnr + TotalFC;
                    Thread th   = new Thread(new ParameterizedThreadStart(LogServerWrite));
                    th.Start(agrs);
                    return(true);
                }
                else
                {
                    throw new Exception("cm:" + cm + " err:" + err + Environment.NewLine);
                }
            }
            catch
            {
                throw;
            }
        }
Beispiel #22
0
        private picc2 GetConfig()
        {
            FileStream   fs   = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.Read);
            StreamReader sr   = new StreamReader(fs, Encoding.Default);
            string       temp = sr.ReadToEnd();

            sr.Close();
            fs.Close();
            picc2   ret = new picc2();
            NewPara np  = new NewPara(temp);

            ret.Signature = np.FindTextByPath("//eg/PrintPICC2/Signature");
            ret.Conflict  = np.FindTextByPath("//eg/PrintPICC2/Conflict");
            ret.OffsetX   = int.Parse(np.FindTextByPath("//eg/PrintPICC2/OffsetX"));
            ret.OffsetY   = int.Parse(np.FindTextByPath("//eg/PrintPICC2/OffsetY"));
            ret.SaveNo    = np.FindTextByPath("//eg/PrintPICC2/SaveNo");
            return(ret);
        }
Beispiel #23
0
        public string GetTNNullPnrByIPID(string ipid)
        {
            NewPara     np  = new NewPara();
            XmlDocument doc = np.getRoot();

            np.AddPara("cm", "RetTNumberNullPnr");
            string strSql = "";

            string strRet = "";
            Conn   cn     = null;

            try
            {
                cn = new Conn();
                //strSql = "select * from eg_user where vcLoginName='" + p_strUserCode.Trim() + "'";
                strSql = "select * from  eg_SrvIps where ipid=" + ipid.Trim();
                DataSet ds           = cn.GetDataSet(strSql);
                string  strAgentCode = ds.Tables[0].Rows[0]["numAgentId"].ToString().Trim();
                if (strAgentCode.Length > 8)
                {
                    strAgentCode = strAgentCode.Substring(0, 8);
                }

                strSql = "select eg_eticket.Pnr from dbo.eg_eticket INNER JOIN dbo.eg_user ON ltrim(rtrim(dbo.eg_eticket.UserID)) = ltrim(rtrim(dbo.eg_user.vcLoginName)) where ({ fn LENGTH(eg_eticket.etNumber) } < 14 or eg_eticket.etNumber IS NULL or eg_eticket.etNumber = ''or ltrim(rtrim(eg_eticket.DecFeeState))='0') and eg_user.numAgentId like '" + strAgentCode + "%' and eg_eticket.OperateTime > CONVERT(DATETIME, '" + System.DateTime.Now.AddDays(-1).ToShortDateString().Trim() + " 00:00:00') AND  eg_eticket.OperateTime < CONVERT(DATETIME, '" + System.DateTime.Now.ToShortDateString().Trim() + " 23:59:59') ";
                ds     = cn.GetDataSet(strSql);
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    strRet += (ds.Tables[0].Rows[i]["Pnr"].ToString().Trim() + ";");
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("GetTNumberNullPnr is err sql=" + strSql + ex.Message);
                throw ex;
            }
            finally
            {
                cn.close();
            }

            np.AddPara("Pnrs", strRet);

            return(np.GetXML());
        }
Beispiel #24
0
        static public List <string> lsValidate = new List <string>();//用于可能提取错误PNR而导致取消记录行,而重复扣款。
        public bool submitinfo()
        {
            try
            {
                lsValidate.Add(Pnr.ToUpper());
                int countGetThisPnr = 0;
                //for (int i = 0; i < lsValidate.Count; i++)
                //{
                //    if (lsValidate[i] == Pnr.ToUpper()) countGetThisPnr++;
                //}
                //if (countGetThisPnr < 5) return false;
                EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
                NewPara np = new NewPara();
                np.AddPara("cm", "CancelPNR");
                np.AddPara("Pnr", Pnr);
                string strReq = np.GetXML();
                string strRet = ws.getEgSoap(strReq);
                if (strRet != "")
                {
                    NewPara np1 = new NewPara(strRet);
                    if (np1.FindTextByPath("//eg/cm") == "RetCancelPNR" && np1.FindTextByPath("//eg/OperationFlag") == "SaveSucc")
                    {
                        lsValidate.Clear();
                        string agrs = "调用取消记录服务" + "<eg66>" + Pnr;
                        Thread th   = new Thread(new ParameterizedThreadStart(etDecFee.LogServerWrite));
                        th.Start(agrs);
//                        Thread.Sleep(10000);
                        return(true);
                    }
                }
                else
                {
                    //System.Windows.Forms.MessageBox.Show("CancelPNR与服务器数据库连接失败!");
                    MessageBox.Show("CancelPNR与服务器数据库连接失败!", "易格服务器错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
            return(false);
        }
Beispiel #25
0
        /// <summary>
        /// 取eagle服務器上的對應票價"fareY~distance"
        /// </summary>
        /// <param name="fromto"></param>
        /// <returns></returns>
        static public string getFareServer(string fromto)
        {
            return(EagleString.EagleFileIO.PriceOf(fromto).ToString() + "~" + EagleString.EagleFileIO.DistanceOf(fromto));

            string ret = "";

            try
            {
                EagleWebService.wsKernal ws = new EagleWebService.wsKernal(GlobalVar.WebServer);
                NewPara np = new NewPara();
                np.AddPara("cm", "GetFC");
                np.AddPara("FROM", fromto.Substring(0, 3));
                np.AddPara("TO", fromto.Substring(3, 3));
                string strReq = np.GetXML();
                string strRet = ws.getEgSoap(strReq);
                if (strRet != "")
                {
                    NewPara np1 = new NewPara(strRet);
                    if (np1.FindTextByPath("//eg/cm") == "RetGetFC")
                    {
                        string tf = np1.FindTextByPath("//eg/BUNKF");
                        string tc = np1.FindTextByPath("//eg/BUNKC");
                        string ty = np1.FindTextByPath("//eg/BUNKY");
                        if (tf != "" && tc != "" && ty != "")
                        {
                            try
                            {
                                return(ty + "~" + tf);
                            }
                            catch
                            {
                            }
                        }
                    }
                }
            }
            catch
            {
            }
            return(ret);
        }
Beispiel #26
0
        public void GetConfig(string insCode)
        {
            if (insCode == "")
            {
                return;
            }
            FileStream   fs   = new FileStream(GlobalVar.s_configfile, FileMode.Open, FileAccess.Read);
            StreamReader sr   = new StreamReader(fs, Encoding.Default);
            string       temp = sr.ReadToEnd();

            sr.Close();
            fs.Close();
            NewPara np = new NewPara(temp);

            ENumberHead = np.FindTextByPath("//eg/" + insCode + "/ENumberHead");
            Signature   = np.FindTextByPath("//eg/" + insCode + "/Signature");
            OffsetX     = int.Parse(np.FindTextByPath("//eg/" + insCode + "/OffsetX"));
            OffsetY     = int.Parse(np.FindTextByPath("//eg/" + insCode + "/OffsetY"));
            SaveNo      = np.FindTextByPath("//eg/" + insCode + "/SaveNo");
            CompanyAddr = np.FindTextByPath("//eg/" + insCode + "/CompanyAddr");
            Phone       = np.FindTextByPath("//eg/" + insCode + "/Phone");
            Term        = np.FindTextByPath("//eg/" + insCode + "/Term");
        }
Beispiel #27
0
        public string getTicketInfo(string bfrom, string eto)//得到
        {
            NewPara     np  = new NewPara();
            XmlDocument doc = np.getRoot();

            np.AddPara("cm", "ret_getTicketInfo");
            string strSql = "";
            string strRet = "";
            Conn   cn     = null;

            try
            {
                cn     = new Conn();
                strSql = "SELECT * FROM eg_ticketInfo WHERE (BFROM = '" + bfrom + "') AND (ETO = '" + eto + "')";
                DataSet ds = cn.GetDataSet(strSql);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strRet = "true";
                }
                else
                {
                    strRet = "false";
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("getTicketInfo is err sql=" + strSql + ex.Message);
                throw ex;
            }
            finally
            {
                cn.close();
            }
            np.AddPara("ret", strRet);
            return(np.GetXML());
        }
Beispiel #28
0
        private void saveCustInfo(Conn cn, string p_strOper, string p_strCustInfo)
        {
            try
            {
                string strRet = "";
                if (p_strCustInfo.Trim() != "")
                {
                    strRet = p_strCustInfo.Trim();

                    if (strRet.IndexOf(";") > 1)
                    {
                        string[] aryCusts = strRet.Split(';');

                        for (int i = 0; i < aryCusts.Length; i++)
                        {
                            string strACust = aryCusts[i];
                            if (strACust.IndexOf(";") > 1)
                            {
                                string[] ary = strACust.Split('-');
                                if (ary.Length > 2)
                                {
                                    NewPara npCust = new NewPara();

                                    npCust.AddPara("cm", "SaveCust");                                   //操作类型说明
                                    npCust.AddPara("vcInpEgUser", p_strOper);
                                    npCust.AddPara("vcIdentCard", ary[1]);
                                    npCust.AddPara("vcCustName", ary[0]);
                                    npCust.AddPara("vcMobile", ary[2]);
                                    npCust.AddPara("numMemSrc", "2");

                                    Custer cu = new Custer();
                                    cu.SaveCust(cn, npCust.GetXML());
                                }
                            }
                        }
                    }
                    else
                    {
                        if (strRet.IndexOf(";") > 1)
                        {
                            string[] ary = strRet.Split('-');
                            if (ary.Length > 2)
                            {
                                NewPara npCust = new NewPara();

                                npCust.AddPara("cm", "SaveCust");                               //操作类型说明
                                npCust.AddPara("vcInpEgUser", p_strOper);
                                npCust.AddPara("vcIdentCard", ary[1]);
                                npCust.AddPara("vcCustName", ary[0]);
                                npCust.AddPara("vcMobile", ary[2]);
                                npCust.AddPara("numMemSrc", "2");

                                Custer cu         = new Custer();
                                string strRetCust = cu.SaveCust(cn, npCust.GetXML());

                                //NewPara npRet = new NewPara(strRetCust);
                                //string strCustId = npRet.FindTextByPath("//eg/CustId");
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("PnrTicket.saveCustInfo is err" + ex.Message);
            }
        }
Beispiel #29
0
        /// <summary>
        /// 客户端生成了一张票据信息,对于傻瓜版
        /// </summary>
        /// <param name="p_strXML"></param> 具体说明见代码末尾
        /// <returns></returns>
        public string NewTickte(string p_strXML)
        {
            Conn   cn          = null;
            string strRet      = "";
            string strCustInfo = "";
            string strOper     = "";

            try
            {
                string  strPnrId    = logic.mytool.util.getId("eg_pnr");
                NewPara npRet       = new NewPara(p_strXML.Trim());
                string  strUserCode = npRet.FindTextByPath("//eg/User").Trim();

                cn = new Conn();
                cn.beginTrans();
                Top2 tp = new Top2(cn);

                string strBz = npRet.FindTextByPath("//eg/Bz").Trim();
                strBz = gs.util.StringTool.getSqlFilterStr(strBz);

                tp.AddRow("numPnrId", "c", strPnrId);
                tp.AddRow("vcPnrNo", "c", npRet.FindTextByPath("//eg/PNR").Trim());
                tp.AddRow("vcLoginName", "c", gs.util.StringTool.getSqlFilterStr(npRet.FindTextByPath("//eg/User").Trim()));
                strOper = gs.util.StringTool.getSqlFilterStr(npRet.FindTextByPath("//eg/User").Trim());
                tp.AddRow("vcPhone", "c", gs.util.StringTool.getSqlFilterStr(npRet.FindTextByPath("//eg/Phone").Trim()));
                tp.AddRow("numPersonCount", "i", npRet.FindTextByPath("//eg/PersonCount").Trim());
                strCustInfo = gs.util.StringTool.getSqlFilterStr(npRet.FindTextByPath("//eg/Names").Trim());
                tp.AddRow("vcNames", "c", strCustInfo);
                tp.AddRow("vcTL", "c", npRet.FindTextByPath("//eg/TL").Trim());

                tp.AddRow("numTkPrc", "d", npRet.FindTextByPath("//eg/numTkPrc").Trim());             //票面价
                tp.AddRow("numRealPrc", "d", npRet.FindTextByPath("//eg/numRealPrc").Trim());         //实收价
                tp.AddRow("numBasePrc", "d", npRet.FindTextByPath("//eg/numBasePrc").Trim());         //基建
                tp.AddRow("numOilPrc", "d", npRet.FindTextByPath("//eg/numOilPrc").Trim());           //燃油
                tp.AddRow("numPoint", "d", npRet.FindTextByPath("//eg/numPoint").Trim());             //返点
                tp.AddRow("numGain", "d", npRet.FindTextByPath("//eg/numGain").Trim());               //利润
                tp.AddRow("numTotal", "d", npRet.FindTextByPath("//eg/numTotal").Trim());             //合计

                tp.AddRow("numStat", "i", "0");
                //tp.AddRow("dtApply","dt",System.DateTime.Now.ToLongTimeString());
                tp.AddRow("dtApply", "t", "getdate()");
                tp.AddRow("vcBz", "c", strBz);


                if (tp.AddNewRec("eg_pnr"))
                {
                    XmlNode nds = npRet.FindNodeByPath("//eg/ATK");
                    for (int i = 0; i < nds.ChildNodes.Count; i++)
                    {
                        XmlNode nodeFlight  = nds.ChildNodes[i].ChildNodes[0];
                        string  strFlightNo = nodeFlight.ChildNodes[0].Value;

                        XmlNode nodeBunk = nds.ChildNodes[i].ChildNodes[1];
                        string  strBunk  = nodeBunk.ChildNodes[0].Value;

                        XmlNode nodeDate = nds.ChildNodes[i].ChildNodes[2];
                        string  strDate  = nodeDate.ChildNodes[0].Value;

                        XmlNode nodeCityPairt = nds.ChildNodes[i].ChildNodes[3];
                        string  strCityPair   = nodeCityPairt.ChildNodes[0].Value;

                        string strIns = "insert into eg_pnrtks(numPnrId,vcFlightNo,vcBunk,vcDate,vcCityPair) values(" + strPnrId +
                                        ",'" + strFlightNo + "','" + strBunk + "','" + strDate + "','" + strCityPair + "')";
                        cn.Update(strIns);
                    }
                    strRet = getOnlineManager(cn, strUserCode, npRet.FindTextByPath("//eg/PNR").Trim());
                }
                cn.commit();
            }
            catch (Exception ex)
            {
                cn.rollback();
                gs.util.func.Write("NewTickte is err" + ex.Message);
            }
            finally
            {
                cn.close();
            }

            /*try
             * {
             *      cn = new Conn();
             *      saveCustInfo(cn,strOper,strCustInfo);//保存客户资料
             * }
             * catch(Exception ex)
             * {
             *      gs.util.func.Write("NewTickte saveCustInfo is err" + ex.Message);
             * }
             * finally
             * {
             *      cn.close();
             * }*/

            return(strRet);
        }
Beispiel #30
0
        public static string procCmm(string p_str)
        {
            string strRet = "";

            try
            {
                //gs.util.func.Write("xml is =" + p_str);

                NewPara npRet  = new NewPara(p_str.Trim());
                string  strCmm = npRet.FindTextByPath("//eg/cm").Trim();
                if (strCmm != "")
                {
                    MessProc mp = new MessProc();

                    if (strCmm == "Login")
                    {
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strPassWord = npRet.FindTextByPath("//eg/PassWord").Trim();
                        strRet = mp.login(strUserName, strPassWord);
                    }

                    if (strCmm == "GetIbeUrl")
                    {
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string ibeID       = npRet.FindTextByPath("//eg/ibeID").Trim();
                        strRet = mp.GetIbeUrl(strUserName, ibeID);
                    }

                    #region
                    if (strCmm == "GetCloseBalance")                    //得到帐户余额
                    {
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        strRet = mp.getCloseBalance(strUserName);
                    }

                    if (strCmm == "DecFee")
                    {                    //消费扣款
                        string strPnr = npRet.FindTextByPath("//eg/Pnr").Trim();
                        string strVal = npRet.FindTextByPath("//eg/TicketPrice").Trim();
                        gs.util.func.Write("Dec Fee Pnr====(" + strPnr + ")(" + strVal + ")");
                        strRet = mp.DecFee(strPnr, strVal);
                    }

                    if (strCmm == "DecFee2")
                    {                    //消费扣款2
                        string strPnr = npRet.FindTextByPath("//eg/Pnr").Trim();
                        string strVal = npRet.FindTextByPath("//eg/TicketPrice").Trim();
                        gs.util.func.Write("Dec Fee2 Pnr====(" + strPnr + ")(" + strVal + ")");
                        strRet = mp.DecFee2(strPnr, strVal);
                    }
                    if (strCmm == "DecFee3")
                    {//消费扣款3写入电子客票号
                        string strPnr    = npRet.FindTextByPath("//eg/Pnr").Trim();
                        string strVal    = npRet.FindTextByPath("//eg/TicketPrice").Trim();
                        string strNumber = npRet.FindTextByPath("//eg/TicketNumber").Trim();
                        gs.util.func.Write("Dec Fee3 Pnr====(" + strPnr + ")(" + strVal + ")");
                        strRet = mp.DecFee3(strPnr, strVal, strNumber);
                    }

                    if (strCmm == "BackFee")
                    {                    //消费扣款
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strVal      = npRet.FindTextByPath("//eg/TicketPrice").Trim();
                        strRet = mp.BackFee(strUserName, strVal);
                    }

                    if (strCmm == "RefreshSelf")
                    {                    //刷新用户在线时间
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        strRet = mp.RereshSelf(strUserName);
                    }

                    if (strCmm == "Logout")
                    {                                                                      //用户登出系统,删除在线用户
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim(); //bug:客户端传过来的节点名称是“user”,而非“UserName”,导致该功能形同虚设
                        strRet = mp.logout(strUserName);
                    }

                    if (strCmm == "CmpPassport") //暂时不用了.
                    {                            //各代理商服务器检查中心数据库中该用户是否已经登入系统,通过认证
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strPassPort = npRet.FindTextByPath("//eg/Passport").Trim();
                        EgUser eu          = new EgUser();
                        strRet = eu.CmpPassport(strPassPort);                           //配合YANG修改了一次,去掉用户名
                    }

                    if (strCmm == "ChgPassword")
                    {                    //用户修改密码
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strPassword = npRet.FindTextByPath("//eg/Password").Trim();
                        strRet = mp.ChgPassword(strUserName, strPassword);
                    }

                    if (strCmm == "SaveOperations")
                    {                    //用户修改密码
                        string strUserName = npRet.FindTextByPath("//eg/User").Trim();
                        string strCm       = npRet.FindTextByPath("//eg/OperationString").Trim();
                        string strCmType   = npRet.FindTextByPath("//eg/Send_Recieve").Trim();
                        string strTime     = npRet.FindTextByPath("//eg/OperationTime").Trim();
                        strRet = mp.SaveLogs(strUserName, strCm, strCmType, strTime);
                    }

                    if (strCmm == "SubmitPNR")
                    {                    //处理傻瓜版的PNR定票信息
                        gs.util.func.Write("pnr:" + npRet.FindTextByPath("//eg/PNR").Trim() + " cm:" + strCmm);
                        strRet = mp.NewPnr(p_str.Trim());
                    }

                    if (strCmm == "SubmitHYX")
                    {                    //航意险保单
                        string strUserID      = npRet.FindTextByPath("//eg/UserID").Trim();
                        string streNumber     = npRet.FindTextByPath("//eg/eNumber").Trim();
                        string strIssueNumber = npRet.FindTextByPath("//eg/IssueNumber").Trim();
                        string strNameIssued  = npRet.FindTextByPath("//eg/NameIssued").Trim();
                        string strCardType    = npRet.FindTextByPath("//eg/CardType").Trim();

                        string strCardNumber  = npRet.FindTextByPath("//eg/CardNumber").Trim();
                        string strRemark      = npRet.FindTextByPath("//eg/Remark").Trim();
                        string strIssuePeriod = npRet.FindTextByPath("//eg/IssuePeriod").Trim();
                        string strIssueBegin  = npRet.FindTextByPath("//eg/IssueBegin").Trim();
                        string strIssueEnd    = npRet.FindTextByPath("//eg/IssueEnd").Trim();

                        string strSolutionDisputed = npRet.FindTextByPath("//eg/SolutionDisputed").Trim();
                        string strNameBeneficiary  = npRet.FindTextByPath("//eg/NameBeneficiary").Trim();
                        string strSignature        = npRet.FindTextByPath("//eg/Signature").Trim();
                        string strSignDate         = npRet.FindTextByPath("//eg/SignDate").Trim();
                        string strInssuerName      = npRet.FindTextByPath("//eg/InssuerName").Trim();                   //

                        string strPnr = npRet.FindTextByPath("//eg/Pnr").Trim();

                        strRet = mp.RegInsurance(strUserID, streNumber, strIssueNumber,
                                                 strNameIssued, strCardType, strCardNumber,
                                                 strRemark, strIssuePeriod, strIssueBegin,
                                                 strIssueEnd, strSolutionDisputed, strNameBeneficiary,
                                                 strSignature, strSignDate, strInssuerName, strPnr);
                    }

                    if (strCmm == "PreSubmitETicket")
                    {
                        gs.util.func.Write("pnr:" + npRet.FindTextByPath("//eg/PNR").Trim() + " cm:" + strCmm);
                        string strUserID      = npRet.FindTextByPath("//eg/UserID").Trim();
                        string strPnr         = npRet.FindTextByPath("//eg/Pnr").Trim();
                        string strDecFeeState = npRet.FindTextByPath("//eg/DecFeeState").Trim();
                        string strIpId        = npRet.FindTextByPath("//eg/IpId").Trim();
                        strRet = mp.RegETicket(strUserID, strPnr,
                                               null, null, null, null, null, null, null,
                                               null, null, null, strDecFeeState, "RetPreSubmitETicket", strIpId, null, null, null
                                               );
                    }

                    if (strCmm == "SubmitETicket")
                    {                    //电子客票上传
                        gs.util.func.Write("pnr:" + npRet.FindTextByPath("//eg/PNR").Trim() + " cm:" + strCmm);
//						string strUserID = npRet.FindTextByPath("//eg/UserID").Trim();
                        string strPnr           = npRet.FindTextByPath("//eg/Pnr").Trim();
                        string stretNumber      = npRet.FindTextByPath("//eg/etNumber").Trim();
                        string strFlightNumber1 = npRet.FindTextByPath("//eg/FlightNumber1").Trim();

                        string strBunk1         = npRet.FindTextByPath("//eg/Bunk1").Trim();
                        string strCityPair1     = npRet.FindTextByPath("//eg/CityPair1").Trim();
                        string strDate1         = npRet.FindTextByPath("//eg/Date1").Trim();
                        string strFlightNumber2 = npRet.FindTextByPath("//eg/FlightNumber2").Trim();

                        string strBunk2       = npRet.FindTextByPath("//eg/Bunk2").Trim();
                        string strCityPair2   = npRet.FindTextByPath("//eg/CityPair2").Trim();
                        string strDate2       = npRet.FindTextByPath("//eg/Date2").Trim();
                        string strTotalFC     = npRet.FindTextByPath("//eg/TotalFC").Trim();
                        string strDecFeeState = npRet.FindTextByPath("//eg/DecFeeState").Trim();
                        //string strIpId = npRet.FindTextByPath("//eg/IpId").Trim();
                        string strIpId      = "";
                        string strBasePrc   = npRet.FindTextByPath("//eg/numBasePrc").Trim();
                        string strOil       = npRet.FindTextByPath("//eg/numFuel").Trim();
                        string strPassenger = npRet.FindTextByPath("//eg/Passenger").Trim();

                        strRet = mp.RegETicket(null, strPnr, stretNumber,
                                               strFlightNumber1, strBunk1, strCityPair1,
                                               strDate1, strFlightNumber2, strBunk2,
                                               strCityPair2, strDate2, strTotalFC, strDecFeeState, "RetSubmitETicket", strIpId, strBasePrc, strOil, strPassenger
                                               );
                    }

                    if (strCmm == "CancelPNR")
                    {
                        string strPnr = npRet.FindTextByPath("//eg/Pnr").Trim();
                        strRet = mp.DelETicket(strPnr);
                    }

                    if (strCmm == "GetUncheckedPNR")
                    {
                        string strUserID = npRet.FindTextByPath("//eg/UserID").Trim();
                        strRet = mp.QueryETicket(strUserID);
                    }

                    if (strCmm == "GetPNRs")
                    {                    //
                        string strUserName = npRet.FindTextByPath("//eg/User").Trim();
                        string strPNRState = npRet.FindTextByPath("//eg/PNRState").Trim();
                        strRet = mp.GetStrPNRs(strUserName, strPNRState);
                    }

                    if (strCmm == "SetPNRStateDelete")
                    {                    //
                        string strUserName = npRet.FindTextByPath("//eg/User").Trim();
                        string strPNRs     = npRet.FindTextByPath("//eg/PNR").Trim();
                        strRet = mp.SetPnrDelState(strUserName, strPNRs);
                    }

                    if (strCmm == "GetFC")
                    {                    //
                        string strFROM = npRet.FindTextByPath("//eg/FROM").Trim();
                        string strTO   = npRet.FindTextByPath("//eg/TO").Trim();
                        strRet = mp.GetFC(strFROM, strTO);
                    }

                    if (strCmm == "SaveFC")
                    {                    //
                        string strFROM  = npRet.FindTextByPath("//eg/FROM").Trim();
                        string strTO    = npRet.FindTextByPath("//eg/TO").Trim();
                        string strBUNKF = npRet.FindTextByPath("//eg/BUNKF").Trim();
                        string strBUNKC = npRet.FindTextByPath("//eg/BUNKC").Trim();
                        string strBUNKY = npRet.FindTextByPath("//eg/BUNKY").Trim();
                        strRet = mp.SaveFC(strFROM, strTO, strBUNKF, strBUNKC, strBUNKY);
                    }

                    if (strCmm == "WriteLog")
                    {                    //
                        string strUser         = npRet.FindTextByPath("//eg/User").Trim();
                        string strCmd          = npRet.FindTextByPath("//eg/Cmd").Trim();
                        string strReturnResult = npRet.FindTextByPath("//eg/ReturnResult").Trim();

                        strRet = mp.SaveSysLogs(strUser, strCmd, strReturnResult);
                        //strRet = "";
                    }

                    if (strCmm == "GetPassenger")
                    {
                        string strPassenger = npRet.FindTextByPath("//eg/Passenger").Trim();
                        strRet = mp.GetPassenger(strPassenger);
                    }

//					if (strCmm == "CheckReceiptNumber")
//					{
//						string strUser = npRet.FindTextByPath("//eg/User").Trim();
//						string strRecieptNumber = npRet.FindTextByPath("//eg/RecieptNumber").Trim();
//						string strCfgNumber = npRet.FindTextByPath("//eg/CfgNumber").Trim();
//						strRet = mp.getEtkBound(strUser,strRecieptNumber,strCfgNumber);
//					}
                    if (strCmm == "CanPrint")
                    {
                        string strUser          = npRet.FindTextByPath("//eg/User").Trim();
                        string strRecieptNumber = npRet.FindTextByPath("//eg/RecieptNumber").Trim();
                        string strCfgNumber     = npRet.FindTextByPath("//eg/CfgNumber").Trim();
                        string strETNumber      = npRet.FindTextByPath("//eg/ETNumber").Trim();
                        strRet = mp.setCanPrint(strUser, strRecieptNumber, strCfgNumber, strETNumber);
                    }

                    if (strCmm == "AddToGroup")
                    {
                        string strUserID        = npRet.FindTextByPath("//eg/UserID").Trim();
                        string strName          = npRet.FindTextByPath("//eg/Name").Trim();
                        string strCardID        = npRet.FindTextByPath("//eg/CardID").Trim();
                        string strGroupTicketID = npRet.FindTextByPath("//eg/GroupTicketID").Trim();

                        strRet = mp.AddGroup(strUserID, strName, strCardID, strGroupTicketID);
                    }

                    if (strCmm == "ListGroupTicket")
                    {
                        string strFromTo = npRet.FindTextByPath("//eg/FromTo").Trim();
                        string strDate   = npRet.FindTextByPath("//eg/Date").Trim();
                        string strUserID = npRet.FindTextByPath("//eg/UserID").Trim();
                        string strType   = npRet.FindTextByPath("//eg/RebateType").Trim();

                        strRet = mp.GetListGroupTicket(strFromTo, strDate, strUserID, strType);
                    }

                    if (strCmm == "SubmitScrollString")
                    {
                        string strUserID     = npRet.FindTextByPath("//eg/UserID").Trim();
                        string strContext    = npRet.FindTextByPath("//eg/Context").Trim();
                        string strBegTime    = npRet.FindTextByPath("//eg/BegTime").Trim();
                        string strEndTime    = npRet.FindTextByPath("//eg/EndTime").Trim();
                        string strNoticeType = npRet.FindTextByPath("//eg/NoticeType").Trim();

                        strRet = mp.AddScrollString(strUserID, strContext, strBegTime, strEndTime, strNoticeType);
                    }

                    if (strCmm == "GetCurrentScrollString")
                    {
                        string strUserID     = npRet.FindTextByPath("//eg/User").Trim();
                        string strNoticeType = npRet.FindTextByPath("//eg/NoticeType").Trim();


                        strRet = mp.GetScrollString(strUserID, strNoticeType);
                    }

                    if (strCmm == "RequestETNumberBelong")
                    {
                        string strETicketNumber = npRet.FindTextByPath("//eg/ETicketNumber").Trim();

                        strRet = mp.getETNumberBelong(strETicketNumber);
                    }
                    if (strCmm == "SubmitPnrState")
                    {
                        gs.util.func.Write("pnr:" + npRet.FindTextByPath("//eg/PNR").Trim() + " cm:" + strCmm);
                        string strUser  = npRet.FindTextByPath("//eg/User").Trim();
                        string strPNR   = npRet.FindTextByPath("//eg/PNR").Trim();
                        string strState = npRet.FindTextByPath("//eg/State").Trim();

                        strRet = mp.setPnrState(strUser, strPNR, strState);
                    }
                    if (strCmm == "GetPubMes")
                    {                    //得到最新的公告消息
                        string strUser = npRet.FindTextByPath("//eg/User").Trim();

                        strRet = mp.getPubMes(strUser);
                    }

                    if (strCmm == "GetUserIpsAndAgents")
                    {
                        string strUser = npRet.FindTextByPath("//eg/User").Trim();
                        strRet = mp.GetUserIpsAndAgents(strUser);
                    }

                    if (strCmm == "GetTekInfo")
                    {                    //得到一张电子客票的信息
                        string strPnr = npRet.FindTextByPath("//eg/Pnr").Trim();
                        strRet = mp.GetTekInfoFromPnr(strPnr);
                    }

                    if (strCmm == "setIncIsCancel")
                    {                    //设置保险的状态为作废
                        string strIncUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strIncCmp      = npRet.FindTextByPath("//eg/IncName").Trim();
                        string strIncNo       = npRet.FindTextByPath("//eg/IncNo").Trim();
                        strRet = mp.cancelInsurance(strIncNo, strIncCmp, strIncUserName);
                    }

                    if (strCmm == "GetPromot")
                    {                                                                        //得到政策共享信息
                        string strPormotUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strAirs           = npRet.FindTextByPath("//eg/Airs").Trim(); //需要查询的航班列表,用,分隔
                        string strDate           = npRet.FindTextByPath("//eg/Date").Trim();
                        string strBegin          = npRet.FindTextByPath("//eg/BeginCity").Trim();
                        string strEnd            = npRet.FindTextByPath("//eg/EndCity").Trim();
                        //strRet = mp.cancelInsurance(strIncNo,strIncCmp,strIncUserName);
                        Policy pl = new Policy();
                        strRet = pl.getPromote(strPormotUserName, strAirs, strDate, strBegin, strEnd);
                    }

                    if (strCmm == "GetUnPayPnr")
                    {                    //得到未完成支付的PNR
                        string strUnPayUserName = npRet.FindTextByPath("//eg/UserName").Trim();

                        EgFee ef = new EgFee();
                        strRet = ef.GetUnPayPnr(strUnPayUserName);
                    }
                    if (strCmm == "GetTNumberNullPnr")
                    {//得到电子客票号为空和未完成支付的PNR
                        string strUnPayUserName = npRet.FindTextByPath("//eg/UserName").Trim();

                        EgFee ef = new EgFee();
                        strRet = ef.GetTNumberNullPnr(strUnPayUserName);
                    }
                    if (strCmm == "GetTNNullPnrByIPID")
                    {//得到电子客票号为空和未完成支付的PNR
                        string strUnPayIPID = npRet.FindTextByPath("//eg/IPID").Trim();

                        EgFee ef = new EgFee();
                        strRet = ef.GetTNNullPnrByIPID(strUnPayIPID);
                    }

                    if (strCmm == "ExistUser")
                    {                    //检查用户名是否重复
                        string strExistUser = npRet.FindTextByPath("//eg/UserName").Trim();
                        EgUser eu           = new EgUser();

                        NewPara np = new NewPara();
                        np.AddPara("cm", "RetExistUser");

                        if (eu.isExistUser(strExistUser))
                        {
                            np.AddPara("stat", "ReUserName");
                        }
                        else
                        {
                            np.AddPara("stat", "GoodUserName");
                        }

                        strRet = np.GetXML();
                    }

                    if (strCmm == "AddNewCUser")
                    {                    // 增加新用户是否成功
                        NewPara npPara = new NewPara();
                        npPara.AddPara("MerchId", npRet.FindTextByPath("//eg/MerchId").Trim());
                        npPara.AddPara("User", npRet.FindTextByPath("//eg/UserName").Trim());
                        npPara.AddPara("UserTitle", npRet.FindTextByPath("//eg/UserTitle").Trim());
                        npPara.AddPara("UserPassWord", npRet.FindTextByPath("//eg/UserPassWord").Trim());
                        npPara.AddPara("Sex", npRet.FindTextByPath("//eg/Sex").Trim());
                        npPara.AddPara("Birthday", npRet.FindTextByPath("//eg/Birthday").Trim());
                        npPara.AddPara("CrosAdr", npRet.FindTextByPath("//eg/CrosAdr").Trim());
                        npPara.AddPara("PostCode", npRet.FindTextByPath("//eg/PostCode").Trim());
                        npPara.AddPara("Email", npRet.FindTextByPath("//eg/Email").Trim());
                        npPara.AddPara("Tel", npRet.FindTextByPath("//eg/Tel").Trim());
                        npPara.AddPara("vcUserType", npRet.FindTextByPath("//eg/vcUserType").Trim());

                        EgUser eu = new EgUser();
                        //gs.util.func.Write("AddNewCUser="******"cm", "RetAddNewCUser");
                        npRetAddCUser.AddPara("AddCUserStat", strAddCUserStat);
                        strRet = npRetAddCUser.GetXML();
                    }

                    if (strCmm == "CUserFirstPage")
                    {                    //
                        string strAgentCode = npRet.FindTextByPath("//eg/AgentCode").Trim();
                        EgUser eu           = new EgUser();

                        strRet = eu.getCUserPageXml(strAgentCode);
                    }

                    if (strCmm == "AV")
                    {                    //
                        string strAvUserName    = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strAvAirCode     = npRet.FindTextByPath("//eg/AirCode").Trim();
                        string strAvFlyDate     = npRet.FindTextByPath("//eg/FlyDate").Trim();
                        string strAvFlyTime     = npRet.FindTextByPath("//eg/FlyTime").Trim();
                        string strAvOrgCityCode = npRet.FindTextByPath("//eg/OrgCityCode").Trim();
                        string strAvDstCityCode = npRet.FindTextByPath("//eg/DstCityCode").Trim();
                        Policy epAv             = new Policy();
                        strRet = epAv.getAv(strAvUserName, strAvAirCode, strAvFlyDate, strAvFlyTime, strAvOrgCityCode, strAvDstCityCode);
                    }

                    if (strCmm == "SentOrder")
                    {                    //
                        string strOrderSent = npRet.FindTextByPath("//eg/OrderPara").Trim();
                        Order  iob          = new Order();
                        strRet = iob.Submit185Order(strOrderSent);
                    }

                    if (strCmm == "GetNewOrderMes")
                    {                    // 得到网站最新的订单请求
                        Order iob2 = new Order();
                        strRet = iob2.getNewOrderList();
                    }

                    if (strCmm == "LoginXyt")
                    {
                        string strUserName = npRet.FindTextByPath("//eg/UserName").Trim();
                        string strPassWord = npRet.FindTextByPath("//eg/PassWord").Trim();
                        strRet = mp.loginXyt(strUserName, strPassWord);
                    }

                    if (strCmm == "SaveCust")
                    {                    //新增一个客户
                        Custer cu = new Custer();
                        strRet = cu.SaveCust(npRet.GetXML());
                    }

                    if (strCmm == "UpdateCust")
                    {                    //修改客户资料
                        Custer cu = new Custer();
                        strRet = cu.UpdateCust(npRet.GetXML());
                    }

                    if (strCmm == "CustAirFee")
                    {                    //新增客户消费记录
                        Custer cu = new Custer();
                        strRet = cu.NewCustAirFee(npRet.GetXML());
                    }

                    if (strCmm == "GetCustInfoByMobile")
                    {                    //得到客户资料
                        Custer cu = new Custer();
                        strRet = cu.getCustInfoByMobile(npRet.FindTextByPath("//eg/MobileNo").Trim());
                    }

                    if (strCmm == "NewCustCallRec")
                    {                    //新增客户来电
                        Custer cu = new Custer();
                        strRet = cu.NewCustCallRec(npRet.GetXML());
                    }

                    if (strCmm == "GetCustLastCalls")
                    {                    //得到客户最近10次来电
                        Custer cu = new Custer();
                        strRet = cu.GetCustLastCalls(npRet.FindTextByPath("//eg/numCustId").Trim());
                    }

                    //打印,脱机打印,行程单号的记录 added by chenqj
                    if (strCmm == "ReceiptNumberLog")
                    {
                        NewPara np = new NewPara();
                        np.AddPara("cm", "RetReceiptNumberLog");

                        try
                        {
                            string username      = npRet.FindTextByPath("//eg/username").Trim();
                            string pnr           = npRet.FindTextByPath("//eg/pnr").Trim();
                            string receiptNumber = npRet.FindTextByPath("//eg/receiptNumber").Trim();
                            string isOffline     = npRet.FindTextByPath("//eg/isOffline").Trim();

                            eTicket.LogIt(username, pnr, receiptNumber, isOffline);
                            np.AddPara("err", string.Empty);
                        }
                        catch (Exception ee)
                        {
                            np.AddPara("err", ee.Message);
                        }

                        strRet = np.GetXML();
                    }

                    if (strCmm == "Check443")
                    {
                        string  strKey = npRet.FindTextByPath("//eg/Key").Trim();
                        NewPara np443  = new NewPara();
                        np443.AddPara("cm", "RetCheck443");
                        if (strKey == "eg66aeg66a")
                        {
                            np443.AddPara("Flag", "true");
                        }
                        else
                        {
                            np443.AddPara("Flag", "false");
                        }

                        strRet = np443.GetXML();
                    }
                    //如果是查询K座信息
                    if (strCmm == "GetKBunkInfo")
                    {
                        string strFromTo = npRet.FindTextByPath("//eg/fromto").Trim();
                        string strDate   = npRet.FindTextByPath("//eg/date").Trim();
                        strRet = mp.GetKBunkInfo(strFromTo, strDate);
                    }
                    //如果是提交K座申请
                    if (strCmm == "ApplyKBunkInfo")
                    {
                        //string strFromTo = npRet.FindTextByPath("//eg/fromto").Trim();
                        XmlNode xn = npRet.FindNodeByPath("//eg/applyinfo");
                        strRet = mp.ApplyKBunkApplication(xn);
                    }
                    if (strCmm == "DisplayKBunkInfo")
                    {
                        //string strFromTo = npRet.FindTextByPath("//eg/fromto").Trim();
                        ///XmlNode xn = npRet.FindNodeByPath("//eg/applyinfo");
                        string orderid = npRet.FindTextByPath("//eg/orderid").Trim();
                        strRet = mp.DisplayKBunkInfo(orderid);
                    }
                    if (strCmm == "ProcessKOrder")
                    {
                        //string strFromTo = npRet.FindTextByPath("//eg/fromto").Trim();
                        ///XmlNode xn = npRet.FindNodeByPath("//eg/applyinfo");
                        strRet = mp.ProcessKOrder(npRet);
                    }
                    if (strCmm == "IsDecFee")
                    {
                        gs.util.func.Write("pnr:" + npRet.FindTextByPath("//eg/PNR").Trim() + " cm:" + strCmm);
                        strRet = mp.IsDecFee(npRet);
                    }
                    //cityTicketInfo   wsl add
                    //得到所有的城市
                    if (strCmm == "GetAllPolicyCity")
                    {
                        CityTicketInfo cti = new CityTicketInfo();
                        strRet = cti.getAllPolicyCity();
                    }
                    //更新票面信息
                    if (strCmm == "UpdateTicketInfo")
                    {
                        string         bfrom = npRet.FindTextByPath("//eg/bfrom").Trim();
                        string         eto   = npRet.FindTextByPath("//eg/eto").Trim();
                        string         bunkf = npRet.FindTextByPath("//eg/bunkf").Trim();
                        string         bunky = npRet.FindTextByPath("//eg/bunky").Trim();
                        CityTicketInfo cti   = new CityTicketInfo();
                        strRet = cti.updateTicketInfo(bfrom, eto, bunkf, bunky);
                    }
                    //添加票面信息
                    if (strCmm == "InsertTicketInfo")
                    {
                        string         bfrom = npRet.FindTextByPath("//eg/bfrom").Trim();
                        string         eto   = npRet.FindTextByPath("//eg/eto").Trim();
                        string         bunkf = npRet.FindTextByPath("//eg/bunkf").Trim();
                        string         bunky = npRet.FindTextByPath("//eg/bunky").Trim();
                        CityTicketInfo cti   = new CityTicketInfo();
                        strRet = cti.insertTicketInfo(bfrom, eto, bunkf, bunky);
                    }
                    //得到票面信息
                    if (strCmm == "GetTicketInfo")
                    {
                        string         bfrom = npRet.FindTextByPath("//eg/bfrom").Trim();
                        string         eto   = npRet.FindTextByPath("//eg/eto").Trim();
                        CityTicketInfo cti   = new CityTicketInfo();
                        strRet = cti.getTicketInfo(bfrom, eto);
                    }
                    if (strCmm == "GetEticketExcel")
                    {
                        string strUser  = npRet.FindTextByPath("//eg/user").Trim();
                        string stardate = npRet.FindTextByPath("//eg/startdate").Trim();
                        string enddate  = npRet.FindTextByPath("//eg/enddate").Trim();
                        strRet = mp.GetEticketReport(strUser, stardate, enddate);
                    }
                    //得到服务器ip地址与端口号 wsl add
                    if (strCmm == "setIPID")
                    {
                        string ipid = npRet.FindTextByPath("//eg/ipid").Trim();
                        strRet = mp.setIPID(ipid);
                    }
                    //得到所有的服务器ip地址与端口号 wsl add
                    if (strCmm == "getIPID")
                    {
                        strRet = mp.getIPID();
                    }
                    #endregion
                }
                else
                {                                   //如果返回为空,说明命令不存在
                    NewPara np = new NewPara();
                    np.AddPara("cm", "CmNotFound"); //返回消息说明请求命令没找到或指令内容为空
                    strRet = np.GetXML();
                }
            }
            catch (Exception ex)
            {
                gs.util.func.Write("requestXML=[" + p_str + "] exception=[" + ex.Message + "]");
                NewPara np = new NewPara();
                np.AddPara("cm", "CmErr");               //返回消息说明命令解析不正常
                np.AddPara("err", ex.Message);
                strRet = np.GetXML();
            }
            //logic.GlobalFunc.iGlobalUserNum--;
            return(strRet);
        }