示例#1
0
        public void Test_BusinessDispose2()
        {
            JetermEntity.Request.TicketInfo request = new JetermEntity.Request.TicketInfo();
            // 运行结果:
            request.TicketNo = "876-2353347683";
            // 运行结果:
            //request.TicketNo = "781-2198667987";
            // 运行结果:
            //request.TicketNo = "8769627417393";

            EtermProxy.BLL.TicketInfo logic = new EtermProxy.BLL.TicketInfo(IntPtr.Zero, IntPtr.Zero, string.Empty, string.Empty);
            CommandResult <JetermEntity.Response.TicketInfo> result = logic.BusinessDispose(request);

            if (result != null && result.state)
            {
                // 运行结果,如:
                //
                //
                Console.WriteLine("运行结果:" + Newtonsoft.Json.JsonConvert.SerializeObject(result.result));
                return;
            }
            if (result.error != null)
            {
                Console.WriteLine("运行错误,错误信息:" + result.error.ErrorMessage);
            }
        }
示例#2
0
        public void Test_BusinessDispose()
        {
#warning 补测另外种情况:【O FM:1CSX CZ    3461  U 26DEC 1425 OK U          26DEC4/26DEC4 20K OPEN FOR USE】,当第5个显示为【OPEN】时(不是【26DEC】),起飞日期是不是被解析成string.Empty?
            JetermEntity.Request.TicketInfo request = new JetermEntity.Request.TicketInfo();
            request.TicketNo = "784-2158602564";
            //request.TicketNo = "7842133192747";
            //request.TicketNo = "7842130024027";

            EtermProxy.BLL.TicketInfo logic = new EtermProxy.BLL.TicketInfo(IntPtr.Zero, IntPtr.Zero, string.Empty, string.Empty);
            CommandResult <JetermEntity.Response.TicketInfo> result = logic.BusinessDispose(request);

            if (result != null && result.state)
            {
                // 运行结果,如:
                // {"TicketNo":"7842158602564","SCity":"CSX","ECity":"CTU","PassengerName":"张细志","Airline":"CZ","Cabin":"U","SDate":"26DEC","TicketStatus":"OPEN FOR USE","BigPnr":"NE8SJT"}
                // {"TicketNo":"7842158602564","SCity":"CSX","ECity":"CTU","PassengerName":"张细志","Airline":"CZ","Cabin":"U","SDate":"26DEC","TicketStatus":"USED/FLOWN","BigPnr":"NE8SJT"}
                Console.WriteLine("运行结果:" + Newtonsoft.Json.JsonConvert.SerializeObject(result.result));
                return;
            }
            if (result.error != null)
            {
                Console.WriteLine("运行错误,错误信息:" + result.error.ErrorMessage);
            }
        }