ChooseCard.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 string cardType;
  21. public string businessType;
  22. public string ID,PatName;
  23. public int sL_CardType;
  24. //设置业务实例
  25. InvokeHelper invoker = new InvokeHelper();
  26. public ChooseCard()
  27. {
  28. InitializeComponent();
  29. rbBaseInsu.Checked = true;
  30. this.StartPosition = FormStartPosition.CenterParent;
  31. }
  32. private void btOk_Click(object sender, EventArgs e)
  33. {
  34. businessType = "01" + cbBusinessType.Text.Substring(0, 3);
  35. Global.pat.isWorkInjury = rbWorkerInsu.Checked;
  36. DialogResult = DialogResult.OK;
  37. }
  38. private void ChooseCard_Load(object sender, EventArgs e)
  39. {
  40. cbBusinessType.SelectedIndex = 0; //挂号
  41. }
  42. private void btCancle_Click(object sender, EventArgs e)
  43. {
  44. DialogResult = DialogResult.Cancel;
  45. }
  46. private void uiButton1_Click(object sender, EventArgs e)
  47. {
  48. string sInput = "", errorMsg="";
  49. JObject joData = new JObject();
  50. joData.Add("", "");
  51. JObject joInput = new JObject();
  52. joInput.Add("data", joData);
  53. InvokeHelper invoker = new InvokeHelper();
  54. // 重庆为1163?
  55. sInput = JsonHelper.setCenterInpar("1193", "");
  56. JObject joRtn =invoker.invokeCenterService("1193", sInput);
  57. if (JsonHelper.parseCenterRtnValue(joRtn, out errorMsg) != 0)
  58. {
  59. MessageBox.Show("修改卡密码失败:" + errorMsg);
  60. }
  61. else
  62. {
  63. MessageBox.Show("修改卡密码成功!");
  64. }
  65. }
  66. }
  67. }