ChooseCard.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Data.SqlTypes;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. using PTMedicalInsurance.Common;
  12. using PTMedicalInsurance.Helper;
  13. using Newtonsoft.Json.Linq;
  14. using PTMedicalInsurance.Forms;
  15. using PTMedicalInsurance.Variables;
  16. namespace PTMedicalInsurance.Forms
  17. {
  18. public partial class ChooseCard : Form
  19. {
  20. public int sL_CardType, personAccountUsedFlag;
  21. public string sYMYWLX, sYLLB, QrCode, JZRQLX, WSBZ = "0", SJDSFBZ = "0";
  22. public ChooseCard()
  23. {
  24. InitializeComponent();
  25. this.StartPosition = FormStartPosition.CenterParent;
  26. }
  27. private void btCancle_Click(object sender, EventArgs e)
  28. {
  29. DialogResult = DialogResult.Cancel;
  30. }
  31. private void btnOk_Click(object sender, EventArgs e)
  32. {
  33. sL_CardType = rbgMdtrtCertType.SelectedIndex; //就诊凭证类型
  34. QrCode = edt_QrCode.Text; //二维码
  35. sYMYWLX = cbb_YMYWLX.Text.Trim().Substring(0, 5); //用码业务类型
  36. if (chk_MedInsuShare.Checked)
  37. Global.pat.bMedInsuShare = true;
  38. else
  39. Global.pat.bMedInsuShare = false;
  40. DialogResult = DialogResult.OK;
  41. }
  42. private void edt_QrCode_KeyPress(object sender, KeyPressEventArgs e)
  43. {
  44. if (e.KeyChar == 13)//如果输入的是回车键
  45. {
  46. //业务逻辑
  47. btnOk_Click(sender, e);
  48. }
  49. }
  50. private void btn_Search_Click(object sender, EventArgs e)
  51. {
  52. if (edt_QrCode.Text == "")
  53. {
  54. MessageBox.Show("请输入医保编号");
  55. edt_QrCode.SelectAll();
  56. return;
  57. }
  58. sL_CardType = rbgMdtrtCertType.SelectedIndex; //就诊凭证类型
  59. QrCode = edt_QrCode.Text; //二维码
  60. sYMYWLX = cbb_YMYWLX.Text.Trim().Substring(0, 5); //用码业务类型
  61. if (chk_MedInsuShare.Checked)
  62. Global.pat.bMedInsuShare = true;
  63. else
  64. Global.pat.bMedInsuShare = false;
  65. DialogResult = DialogResult.OK;
  66. }
  67. private void ChooseCard_Load(object sender, EventArgs e)
  68. {
  69. rbgMdtrtCertType.SelectedIndex = 0; //社保卡
  70. cbb_YMYWLX.SelectedIndex = 0; //用码业务类型
  71. if (Global.inf.operationType == "RegisterOP") //门诊挂号结算时 才显示
  72. chk_MedInsuShare.Visible = true;
  73. }
  74. private void rbgMdtrtCertType_ValueChanged(object sender, int index, string text)
  75. {
  76. //电子凭证
  77. if (rbgMdtrtCertType.SelectedIndex == 1)
  78. {
  79. cbb_YMYWLX.Enabled = true;
  80. edt_QrCode.Focus();
  81. }
  82. else
  83. cbb_YMYWLX.Enabled = false;
  84. }
  85. }
  86. }