Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("请在无法正常提交情况下使用紧急提交!是否继续?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
                == DialogResult.No)
            {
                return;
            }
            if (!EagleAPI.IsRtCode(textBox1.Text.Trim()))
            {
                MessageBox.Show("PNR有错误!请仔细核对");
                return;
            }
            try
            {
                EasySubmitPnr sp = new EasySubmitPnr();
                if (sp.submit_easy_pnr(textBox1.Text, "紧急提交!",
                                       "紧急提交备注" + "(系统增加:有航线未取到票价信息)", "紧急提交姓名", "", "0",
                                       new string[] { "EG66", "Y" },
                                       new string[] { DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour.ToString("D2") + DateTime.Now.Minute.ToString("D2")
                                                      , "AAAZZZ" },
                                       new string[] { "EG66", "Y" },
                                       new string[] { DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour.ToString("D2") + DateTime.Now.Minute.ToString("D2")
                                                      , "AAAZZZ" },
                                       "0", "0", "0", "0", "0", "0", "0")
                    )
                {
                    bSubmitSuccess = true;
                    MessageBox.Show("恭喜,紧急提交成功", "CONGRATUATIONS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                else
                {
                    MessageBox.Show("抱歉,紧急提交失败,请检查提交项是否完整", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch
            {
                this.Text = "已处理完毕,若未提示成功,请再次提交";
            }
        }
Пример #2
0
        public void threadSubmit()
        {
            this.button1.Text    = "正在处理……";
            this.button2.Text    = "请稍等";
            this.button1.Enabled = false;
            this.button2.Enabled = false;
            try
            {
                steps(textBox1.Text.Trim());
            }
            catch (System.Net.Sockets.SocketException e1)
            {
                string msg = "IBE {0}号线路故障,将启用其他线路,请重新尝试。附详细信息:\n\n{1}";
                EagleWebService.IbeStuff.RefreshIbeUrl();
                msg = string.Format(msg, Options.GlobalVar.IbeID, e1.Message);
                MessageBox.Show(msg);
                this.Text = "IBE 故障?!";
                return;
            }
            catch (System.Net.WebException e2)
            {
                string msg = "IBE {0}号线路故障,将启用其他线路,请重新尝试。附详细信息:\n\n{1}";
                EagleWebService.IbeStuff.RefreshIbeUrl();
                msg = string.Format(msg, Options.GlobalVar.IbeID, e2.Message);
                MessageBox.Show(msg);
                this.Text = "IBE 故障?!";
                return;
            }
            catch (Exception ex)
            {
                if (ex.Message == "error1")
                {
                    MessageBox.Show("计算返点时发生错误,请重新提交");
                    this.Text = "请重新提交,或者使用紧急提交";
                    return;
                }
                if (ex.Message == "ErrorCardId")
                {
                    MessageBox.Show("请在PNR中输入身份证SSR项后重新提交");
                    this.Text = "无身份证";
                    return;
                }
                EasySubmitPnr sp = new EasySubmitPnr();
                try
                {
                    if (sp.submit_easy_pnr(textBox1.Text, strTktl,
                                           textBox2.Text + "(系统增加:有航线未取到票价信息)", txtName.Text, "", txtName.Text.Split(';').Length.ToString(),
                                           new string[] { textBox3.Text, textBox7.Text },
                                           new string[] { textBox4.Text, textBox8.Text },
                                           new string[] { textBox5.Text, textBox9.Text },
                                           new string[] { textBox6.Text, textBox10.Text },
                                           "0", "0", "0", "0", "0", "0", "0")
                        )
                    {
                        bSubmitSuccess = true;
                        MessageBox.Show("恭喜,提交成功", "CONGRATUATIONS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                    else
                    {
                        MessageBox.Show("抱歉,提交失败,请检查提交项是否完整", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    this.Text = "已处理完毕,若未提示成功,请再次提交";
                }
                catch (Exception ex1)
                {
                    if (ex1.Message == "BTOC")
                    {
                        this.Close();
                    }
                }
            }

            this.button1.Text    = "提交";
            this.button2.Text    = "查看PNR";
            this.button1.Enabled = true;
            this.button2.Enabled = true;
        }
Пример #3
0
        public void step9(string[] inarray, string telephone)
        {
            this.Text = "正在向服务器传送数据……";
            Application.DoEvents();
            if (txtName.Text.Trim() == "" || textBox3.Text.Trim() == "")
            {
                MessageBox.Show("请先提取PNR或者正确输入姓名身份证及所订航班信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (textBox1.Text.Trim().Length != 5 || !EagleAPI.IsRtCode(textBox1.Text.Trim()))
            {
                //if (EagleAPI.IsRtCode(textBox1.Text.Trim()))
                {
                    MessageBox.Show("错误PNR!PNR只能为五个字节,PNR中不可能有字母0,I,U", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }

            if (GlobalVar2.gbUserModel == 0)//b2c用户无视余额限制 added by chenqj
            {
                GetRemainMoney rm = new GetRemainMoney();
                rm.getcurmoney();
                string cmoney = rm.getcurmoney();
                if (cmoney != "A")
                {
                    GlobalVar.f_CurMoney = cmoney;
                    //GlobalVar.f_CurMoney = EagleAPI.substring(GlobalVar.f_CurMoney, 0, GlobalVar.f_CurMoney.Length - 2) + "00";
                    if (float.Parse(GlobalVar.f_CurMoney) <= -500F)
                    {
                        //MessageBox.Show("对不起,您的余额不足!");
                        MessageBox.Show("抱歉,您的余额不足!请及时冲款", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    float yujiYe = float.Parse(GlobalVar.f_CurMoney) - float.Parse(inarray[6]);
                    if (yujiYe < 0)
                    {
                        MessageBox.Show("严重警告,本笔金额预计将超支,请及时冲款", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else if (yujiYe < 500)
                    {
                        MessageBox.Show("警告:本笔金额扣款后预计余额将少于500,请及时冲款", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else if (yujiYe < 1000)
                    {
                        MessageBox.Show("提示:本笔金额扣款后预计余额将少于1000,请及时冲款", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    //MessageBox.Show("获取余额失败!");
                    MessageBox.Show("抱歉,获取余额失败!请尝试重新提交", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);

                    return;
                }
            }
            if (textBox9.Text.Trim() == "")
            {
                textBox9.Text = textBox5.Text;
            }
            EasySubmitPnr sp = new EasySubmitPnr();

            //if (sp.submit_easy_pnr(this.textBox1.Text, "黑屏提交!", null,this.textBox2.Text))
            try
            {
                if (sp.submit_easy_pnr(textBox1.Text, strTktl,
                                       textBox2.Text + (ChildCount > 0 ? "有" + ChildCount.ToString() + "名儿童旅客" : ""),
                                       txtName.Text, telephone, txtName.Text.Split(';').Length.ToString(),
                                       new string[] { textBox3.Text, textBox7.Text },
                                       new string[] { textBox4.Text, textBox8.Text },
                                       new string[] { textBox5.Text, textBox9.Text },
                                       new string[] { textBox6.Text, textBox10.Text },
                                       inarray[0], inarray[1], inarray[2], inarray[3], inarray[4], inarray[5], inarray[6])
                    )
                {
                    //this.textBox2.Text += "恭喜,提交成功!";
                    bSubmitSuccess = true;
                    MessageBox.Show("恭喜,提交成功", "CONGRATUATIONS", MessageBoxButtons.OK, MessageBoxIcon.Information,
                                    MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
                }
                else //this.textBox1.Text += "提交失败!";
                {
                    if (sp.submit_easy_pnr(textBox1.Text, strTktl,
                                           textBox2.Text + "(系统增加:有航线未取到票价信息)", txtName.Text, "", txtName.Text.Split(';').Length.ToString(),
                                           new string[] { textBox3.Text, textBox7.Text },
                                           new string[] { textBox4.Text, textBox8.Text },
                                           new string[] { textBox5.Text, textBox9.Text },
                                           new string[] { textBox6.Text, textBox10.Text },
                                           "0", "0", "0", "0", "0", "0", "0")
                        )
                    {
                        MessageBox.Show("恭喜,提交成功", "CONGRATUATIONS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                    else
                    {
                        MessageBox.Show("抱歉,提交失败,请检查提交项是否完整", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                if (ex.Message == "BTOC")
                {
                    this.Close();
                }
            }
            this.Text = "提交PNR";
        }