Ejemplo n.º 1
0
        /// <summary>
        /// 查询航班
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="startCity">出发城市三字码</param>
        /// <param name="midCity">中转城市三字码</param>
        /// <param name="endCity">到达城市三字码</param>
        /// <param name="startDate">出发时间</param>
        /// <param name="backDate">返回时间</param>
        /// <param name="airTravelType">行程类型</param>
        /// <param name="cairry">承运人(航空公司)</param>
        /// <param name="isQueryShareFlight">是否查询共享航班</param>
        /// <param name="isQuerySpecialFlight">是否查询特价航班</param>
        /// <param name="cacheGUID">out 缓存guid 键</param>
        /// <returns>返回DataSet格式航班信息</returns>
        private DataSet AirQueryDataSet(UserLoginInfo userInfo, string startCity, string midCity, string endCity, string startDate,
                                        string backDate, AirTravelType airTravelType, string cairry, bool isQueryShareFlight, bool isQuerySpecialFlight,
                                        out string cacheGUID, out DataSet ds_ConnOrRound)
        {
            ds_ConnOrRound = null;
            DataSet ds_Flight = null;

            try
            {
                #region 变量申明及参数赋值

                int      num       = 0;
                AirQurey airQuery  = new AirQurey(userInfo.BaseParametersList, userInfo.User, userInfo.Company);
                string   begintime = DateTime.Now.ToString("mm:ss:fff");
                PbProject.Model.definitionParam.SelectCityParams selectCityParams = new PbProject.Model.definitionParam.SelectCityParams();
                selectCityParams.fcity      = startCity;
                selectCityParams.mcity      = midCity;
                selectCityParams.tcity      = endCity;
                selectCityParams.time       = startDate;
                selectCityParams.Totime     = backDate;
                selectCityParams.cairry     = cairry;
                selectCityParams.TravelType = (int)airTravelType;
                selectCityParams.num        = num;
                selectCityParams.mEmployees = userInfo.User;
                selectCityParams.mCompany   = userInfo.Company;
                selectCityParams.IsShowGX   = isQueryShareFlight;//true 不显示,false 显示

                #endregion

                if (airTravelType == AirTravelType.ConnWay)//联程
                {
                    selectCityParams.tcity = midCity;
                }
                ds_Flight = airQuery.StartForInterface(selectCityParams, out cacheGUID);               //单程只查一次

                if (airTravelType == AirTravelType.RoundWay || airTravelType == AirTravelType.ConnWay) //往返联成的情况需要读取两次IBE数据
                {
                    if (airTravelType == AirTravelType.RoundWay)                                       //往返
                    {
                        selectCityParams.fcity = endCity;
                        selectCityParams.tcity = startCity;
                    }
                    if (airTravelType == AirTravelType.ConnWay)//联程
                    {
                        selectCityParams.fcity = midCity;
                        selectCityParams.tcity = endCity;
                    }

                    selectCityParams.time = backDate;
                    airQuery       = new AirQurey(userInfo.BaseParametersList, userInfo.User, userInfo.Company);
                    ds_ConnOrRound = airQuery.StartForInterface(selectCityParams, out cacheGUID);//查询航班
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(ds_Flight);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 是否是特价仓位
        /// </summary>
        /// <param name="userInfo">用户信息</param>
        /// <param name="space">舱位</param>
        /// <returns>是否是特价舱位</returns>
        public bool IsSpecialSpace(UserLoginInfo userInfo, string space, string carryCode)
        {
            bool           isSpecialSpace;
            BaseDataManage Manage   = new BaseDataManage();
            AirQurey       airQuery = new AirQurey(userInfo.BaseParametersList, userInfo.User, userInfo.Company);
            string         GCpyNo   = userInfo.Company.UninCode.Substring(0, 12);//获取上级供应商或落地运营商的ID
            string         sqlwhere = " 1=1 "
                                      + " and CpyNo='" + GCpyNo + "'";
            List <Tb_SpecialCabin> objList = Manage.CallMethod("Tb_SpecialCabin", "GetList", null, new object[] { sqlwhere }) as List <Tb_SpecialCabin>;

            isSpecialSpace = airQuery.juageSpecialType(carryCode, space, objList);
            return(isSpecialSpace);
        }