ChooseCard.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. namespace PTMedicalInsurance.Forms
  13. {
  14. public partial class ChooseCard : Form
  15. {
  16. public string cardType;
  17. public string businessType;
  18. public string ID;
  19. public ChooseCard()
  20. {
  21. InitializeComponent();
  22. }
  23. private void uiPanel2_Click(object sender, EventArgs e)
  24. {
  25. }
  26. private void btOk_Click(object sender, EventArgs e)
  27. {
  28. cardType = "0" + (rbgCardType.SelectedIndex +1).ToString();
  29. businessType = "01" + cbBusinessType.Text.Substring(0,3);
  30. if (rbgCardType.SelectedIndex == 1)
  31. {
  32. if (tbID.Text == "")
  33. {
  34. ID = "";
  35. }
  36. else
  37. {
  38. ID = tbID.Text;
  39. }
  40. }
  41. DialogResult = DialogResult.OK;
  42. }
  43. private void ChooseCard_Load(object sender, EventArgs e)
  44. {
  45. rbgCardType.SelectedIndex = 2;
  46. cbBusinessType.SelectedIndex = 0;
  47. }
  48. private void rbgCardType_ValueChanged(object sender, int index, string text)
  49. {
  50. if (rbgCardType.SelectedIndex == 0)
  51. {
  52. cbBusinessType.Enabled = true;
  53. }
  54. else
  55. {
  56. cbBusinessType.Enabled = false;
  57. }
  58. }
  59. private void btCancle_Click(object sender, EventArgs e)
  60. {
  61. DialogResult = DialogResult.Cancel;
  62. }
  63. }
  64. }