OtherQueryProcess.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using Newtonsoft.Json.Linq;
  2. using PTMedicalInsurance.Common;
  3. using PTMedicalInsurance.Forms;
  4. using PTMedicalInsurance.Helper;
  5. using PTMedicalInsurance.Variables;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows.Forms;
  12. namespace PTMedicalInsurance.Business
  13. {
  14. class OtherQueryProcess : AbstractProcess
  15. {
  16. TradeEnum trade;
  17. /// <summary>
  18. /// 构造函数
  19. /// </summary>
  20. /// <param name="trade">交易</param>
  21. public OtherQueryProcess(TradeEnum trade)
  22. {
  23. this.trade = trade;
  24. }
  25. public override CallResult Process(JObject input)
  26. {
  27. this.OrginalInput = input;
  28. switch (this.trade)
  29. {
  30. case TradeEnum.HistoryPrescriptionQuery:
  31. QueryPatientPrescription();
  32. break;
  33. default:
  34. break;
  35. }
  36. return Success();
  37. }
  38. private void QueryPatientPrescription()
  39. {
  40. JArray list = hBus.QueryPatientPrescription(Global.pat.name, Global.pat.certNO);
  41. PrescriptionForm form = new PrescriptionForm();
  42. if (list?.Count > 0)
  43. {
  44. form.initList(list);
  45. }
  46. form.ShowDialog();
  47. }
  48. }
  49. }