Exemple #1
0
        public Dictionary <string, string> AutoCompositeTicket(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem                  platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _517AccountInfo             accountInfo = GetInfo(platSystem, areaCity);
            Dictionary <string, string> resultDic   = new Dictionary <string, string>();
            PTServiceSoapClient         m_PTService = new PTServiceSoapClient();
            DataSet dsOrderInfo = m_PTService.PT_517GetOrderInfo(accountInfo._517Accout, accountInfo._517Password, accountInfo._517Ag, outOrderId, pnr);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables.Contains("Passenger") &&
                dsOrderInfo.Tables["Passenger"].Columns.Contains("Name") &&
                dsOrderInfo.Tables["Passenger"].Rows.Count > 0 &&
                dsOrderInfo.Tables["OrderInfo"].Rows.Count > 0
                )
            {
                DataRowCollection drs      = dsOrderInfo.Tables["Passenger"].Rows;
                string            ticketNo = "";
                foreach (DataRow dr in drs)
                {
                    ticketNo = dr["TicketNo"].ToString().Trim().Replace("--", "-");
                    if (ticketNo != "")
                    {
                        if (ticketNo.Contains("-") && ticketNo.Split('-').Length == 2 && ticketNo.Split('-')[1].Trim() == "")
                        {
                            continue;
                        }
                        if (!resultDic.ContainsKey(dr["Name"].ToString().ToUpper()))
                        {
                            resultDic.Add(dr["Name"].ToString().ToUpper(), ticketNo);
                        }
                    }
                }
            }
            return(resultDic);
        }
Exemple #2
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _517AccountInfo     accountInfo = GetInfo(platSystem, areaCity);
            string              result      = string.Empty;
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrderInfo = m_PTService.PT_517GetOrderInfo(accountInfo._517Accout, accountInfo._517Password, accountInfo._517Ag, outOrderId, pnr);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables.Contains("OrderInfo") &&
                dsOrderInfo.Tables["OrderInfo"].Columns.Contains("OrderStatus") &&
                dsOrderInfo.Tables["OrderInfo"].Rows.Count > 0
                )
            {
                result = dsOrderInfo.Tables["OrderInfo"].Rows[0]["OrderStatus"].ToString();
            }
            else
            {
                throw new OrderCommException("获取订单状态失败!");
            }
            return(result);
        }