Exemple #1
0
        /// <summary>
        /// 启动,在计时器里定时调用
        /// </summary>
        private void start()
        {
            m_running = true;

            string pnr = fc.PnrUnchecked(m_li.b2b.username).Trim();

            if (pnr != "")
            {
                EagleFileIO.LogWrite("PNR=" + pnr);
                if (BaseFunc.PnrValidate(pnr))
                {
                    m_pool.Clear();
                    string cmd = m_pool.HandleCommand("rt:n/" + pnr + "/eg");
                    m_socket.SendCommandBack(cmd, EagleProtocal.TypeOfCommand.AutoPnBack);
                }
                else
                {
                    bool flag = false;
                    fc.SubmitEticketInfomation("INVALID PNR", "", ' ', "", DateTime.Now, "", ' ', "", DateTime.Now, 0, 1, "", "", 0, 0, 0, ref flag);
                }
            }
            else if (ls_pnr.Count > 0)
            {
                pnr = ls_pnr[0];
                EagleFileIO.LogWrite("PNR=" + pnr);
                ls_pnr.RemoveAt(0);
                m_pool.Clear();
                string cmd = m_pool.HandleCommand("rt:n/" + pnr + "/eg");
                m_socket.SendCommandBack(cmd, EagleProtocal.TypeOfCommand.AutoPnBack);
            }
            else
            {
                EagleFileIO.LogWrite("There are no eticket infomation to upload!");
                m_running = false;
            }
        }