ChooseCard.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 Newtonsoft.Json.Linq;
  12. namespace BJShouXinYB_Demo
  13. {
  14. public partial class ChooseCard : Form
  15. {
  16. public int sL_CardType, iOtherProvLocal, personAccountUsedFlag;
  17. public string sYMYWLX, QrCode, JZRQLX, WSBZ = "0", SJDSFBZ = "0";
  18. public ChooseCard()
  19. {
  20. InitializeComponent();
  21. this.StartPosition = FormStartPosition.CenterParent;
  22. }
  23. private void btn_Search_Click(object sender, EventArgs e)
  24. {
  25. if (edt_QrCode.Text == "")
  26. {
  27. MessageBox.Show("请输入医保编号");
  28. edt_QrCode.SelectAll();
  29. return;
  30. }
  31. if (chk_ZHZF.Checked)
  32. personAccountUsedFlag = 1;
  33. else
  34. personAccountUsedFlag = 0;
  35. DialogResult = DialogResult.OK;
  36. }
  37. private void btOk_Click(object sender, EventArgs e)
  38. {
  39. if (rbgOtherProv.SelectedIndex == 0)
  40. iOtherProvLocal = 0; //本地
  41. else
  42. iOtherProvLocal = 1; //异地
  43. sL_CardType = rbgMdtrtCertType.SelectedIndex; //就诊凭证类型
  44. QrCode = edt_QrCode.Text; //二维码
  45. sYMYWLX = cbb_YMYWLX.Text.Trim().Substring(0, 5); //用码业务类型
  46. DialogResult = DialogResult.OK;
  47. }
  48. private void ChooseCard_Load(object sender, EventArgs e)
  49. {
  50. rbgMdtrtCertType.SelectedIndex = 0; //社保卡
  51. cbb_YMYWLX.SelectedIndex = 0; //用码业务类型
  52. rbgOtherProv.SelectedIndex = 0; //本地
  53. iOtherProvLocal = 0;
  54. }
  55. private void ChooseCard_FormClosed(object sender, FormClosedEventArgs e)
  56. {
  57. if (cbb_JZRQLX.SelectedIndex >= 0)
  58. JZRQLX = cbb_JZRQLX.Text.Trim().Substring(0, 1);
  59. WSBZ = chk_WSBZ.Checked.ToString();
  60. SJDSFBZ = chk_SJDSFBZ.Checked.ToString();
  61. }
  62. private void rbgMdtrtCertType_ValueChanged(object sender, int index, string text)
  63. {
  64. //电子凭证
  65. if (rbgMdtrtCertType.SelectedIndex == 1)
  66. {
  67. edt_QrCode.Enabled = true;
  68. cbb_YMYWLX.Enabled = true;
  69. edt_QrCode.Focus();
  70. }
  71. else
  72. {
  73. edt_QrCode.Enabled = false;
  74. cbb_YMYWLX.Enabled = false;
  75. }
  76. }
  77. private void btCancle_Click(object sender, EventArgs e)
  78. {
  79. DialogResult = DialogResult.Cancel;
  80. }
  81. }
  82. }