private void tbPnr_KeyUp(object sender, KeyEventArgs e) { GlobalVar.formSendCmdType = GlobalVar.FormSendCommandType.none; if (radioButton1.Checked) { PrintHyx.PrintHyxPublic.PnrTextBoxKeyUp(tbPnr, cbName, e, ref retstring); } if (radioButton3.Checked && e.KeyValue == 13) { string piaohao = tbPnr.Text.Trim().Replace("-", "").Replace(" ", ""); if (piaohao.Length != 13) { MessageBox.Show("票号错误"); return; } piaohao = piaohao.Substring(0, 3) + "-" + piaohao.Substring(3); string cmd = "detr:tn/" + piaohao; PrintHyx.PrintHyxPublic.PnrTextBoxKeyUp(tbPnr, cbName, e, ref retstring, cmd); } if (radioButton2.Checked) { if (e.KeyValue == 13) { AirCode ac = new AirCode(tbPnr.Text); ac.ShowDialog(); if (ac.airCode != "") { tbPnr.Text = ac.airCode; } PrintHyx.PrintHyxPublic.PnrTextBoxKeyUp(tbPnr, cbName, e, ref retstring); } } }
private void tbPnr_KeyUp(object sender, KeyEventArgs e) { cb被保险人姓名.Items.Clear(); GlobalVar.formSendCmdType = GlobalVar.FormSendCommandType.none; if (rb1.Checked) { if (GlobalVar.serverAddr == GlobalVar.ServerAddr.HangYiWang) { PrintHyx.PrintHyxPublic.PnrTextBoxKeyUp(tbPnr, cb被保险人姓名, e, ref retstring); } else if (GlobalVar.serverAddr == GlobalVar.ServerAddr.Eagle) { if (e.KeyValue == 13) { rtPnr(); } } } if (rb3.Checked && e.KeyValue == 13) { string piaohao = tbPnr.Text.Trim().Replace("-", "").Replace(" ", ""); if (piaohao.Length != 13) { MessageBox.Show("票号错误"); return; } piaohao = piaohao.Substring(0, 3) + "-" + piaohao.Substring(3); string cmd = "detr:tn/" + piaohao; PrintHyx.PrintHyxPublic.PnrTextBoxKeyUp(tbPnr, cb被保险人姓名, e, ref retstring, cmd); } if (rb2.Checked) { if (e.KeyValue == 13) { AirCode ac = new AirCode(tbPnr.Text); ac.ShowDialog(); if (ac.airCode != "") { tbPnr.Text = ac.airCode; } if (GlobalVar.serverAddr == GlobalVar.ServerAddr.HangYiWang) { PrintHyx.PrintHyxPublic.PnrTextBoxKeyUp(tbPnr, cb被保险人姓名, e, ref retstring); } else if (GlobalVar.serverAddr == GlobalVar.ServerAddr.Eagle) { rtPnr(); } } } }