STA.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows.Forms;
  8. using Newtonsoft.Json.Linq;
  9. using PTMedicalInsurance.Common;
  10. using PTMedicalInsurance.Forms;
  11. using PTMedicalInsurance.Helper;
  12. using PTMedicalInsurance.Variables;
  13. namespace PTMedicalInsurance.Business
  14. {
  15. class STA
  16. {
  17. //设置业务实例
  18. CenterBusiness cBus = new CenterBusiness();
  19. HisMainBusiness hBus = new HisMainBusiness();
  20. HisIrisServices hIS = new HisIrisServices();
  21. MIIrisServices mIS = new MIIrisServices();
  22. InvokeHelper invoker = new InvokeHelper();
  23. public delegate void callBack(string errMsg);
  24. public void CallBack(string errMsg)
  25. {
  26. MessageBox.Show(errMsg);
  27. }
  28. [STAThread]
  29. public void PrescribeCirculation(object o)
  30. {
  31. try
  32. {
  33. //显示处方上传
  34. PrescriptionCirculation PresCir = new PrescriptionCirculation("");
  35. //PresCir.WindowState = FormWindowState.Minimized;
  36. PresCir.ShowDialog();
  37. }
  38. catch (Exception ex)
  39. {
  40. CallBack(ex.Message);
  41. }
  42. }
  43. //
  44. [STAThread]
  45. public void CheckAndClearing(object o)
  46. {
  47. try
  48. {
  49. PTMedicalInsurance.Forms.Clearings.Clearing frmEX = new PTMedicalInsurance.Forms.Clearings.Clearing();
  50. //Clearing frmEX = new Clearing();
  51. if (frmEX.ShowDialog() == DialogResult.OK)
  52. {
  53. }
  54. }
  55. catch (Exception ex)
  56. {
  57. CallBack(ex.Message);
  58. }
  59. }
  60. [STAThread]
  61. public void PrintSettlementList(object o)
  62. {
  63. try
  64. {
  65. SettlementChecklist frmSettlList;
  66. JObject joInParam = (JObject)o;
  67. string insuAdmObj = JsonHelper.getDestValue(joInParam, "insuAdmObj");
  68. if (insuAdmObj == "")
  69. {
  70. frmSettlList = new SettlementChecklist();
  71. tools.ShowAppDiaglog(frmSettlList);
  72. }
  73. else
  74. {
  75. JObject joInsuAdmObj = JObject.Parse(insuAdmObj);
  76. frmSettlList = new SettlementChecklist(joInsuAdmObj);
  77. string groupID = JsonHelper.getDestValue((JObject)Global.curEvt.jaSession[0], "groupID");
  78. DataTable dt = (DataTable)frmSettlList.dgvSettlRecord.DataSource;
  79. frmSettlList.btnPrint_Click(null, null);
  80. }
  81. }
  82. catch (Exception ex)
  83. {
  84. CallBack(ex.Message);
  85. }
  86. }
  87. [STAThread]
  88. public void Test(object o)
  89. {
  90. try
  91. {
  92. //对账清分
  93. PTMedicalInsurance.Forms.BasicDatas.BasicData frm = new PTMedicalInsurance.Forms.BasicDatas.BasicData();
  94. frm.WindowState = FormWindowState.Maximized;
  95. frm.ShowDialog();
  96. }
  97. catch (Exception ex)
  98. {
  99. CallBack(ex.Message);
  100. }
  101. }
  102. }
  103. public class WindowWrapper : System.Windows.Forms.IWin32Window
  104. {
  105. public WindowWrapper(IntPtr handle)
  106. {
  107. _hwnd = handle;
  108. }
  109. public IntPtr Handle
  110. {
  111. get { return _hwnd; }
  112. }
  113. private IntPtr _hwnd;
  114. }
  115. }