SettlementForm.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using Newtonsoft.Json.Linq;
  11. using PTMedicalInsurance.Variables;
  12. using PTMedicalInsurance.Business;
  13. using PTMedicalInsurance.Common;
  14. namespace PTMedicalInsurance.Forms
  15. {
  16. public partial class SettlementForm : Form
  17. {
  18. //1.声明自适应类实例
  19. AutoResizeForm asc = new AutoResizeForm();
  20. public SettlementForm()
  21. {
  22. InitializeComponent();
  23. //this.StartPosition = FormStartPosition.CenterParent;
  24. asc.controllInitializeSize(this);
  25. asc.controlAutoSize(this);
  26. }
  27. public SettlementForm(JObject jo)
  28. {
  29. InitializeComponent();
  30. JObject joSettlmentInfo = JObject.FromObject(jo["setlinfo"]);
  31. dtSettlmentDetail = (DataTable)jo["setldetail"].ToObject(typeof(DataTable));
  32. this.tbAdmCertType.Text = joSettlmentInfo["mdtrt_cert_type"].Text();
  33. this.tbPsnCertType.Text = joSettlmentInfo["psn_cert_type"].Text();
  34. this.tbPsnCertNO.Text = joSettlmentInfo["certno"].Text();
  35. this.tbInsuType.Text = joSettlmentInfo["insutype"].Text();
  36. this.tbPersonType.Text = joSettlmentInfo["psn_type"].Text();
  37. this.tbMedType.Text = joSettlmentInfo["med_type"].Text();
  38. this.tbSumamt.Text = joSettlmentInfo["medfee_sumamt"].Text();
  39. this.tbFullOwnPay.Text = joSettlmentInfo["fulamt_ownpay_amt"].Text();
  40. this.tbOverLimitOwnPay.Text = joSettlmentInfo["overlmt_selfpay"].Text();
  41. this.tbPreSelfPay.Text = joSettlmentInfo["preselfpay_amt"].Text();
  42. this.tbInScopyAmount.Text = joSettlmentInfo["inscp_scp_amt"].Text();
  43. this.tbActualPayDeduLine.Text = joSettlmentInfo["act_pay_dedc"].Text();
  44. this.tbInsuFundPay.Text = joSettlmentInfo["hifp_pay"].Text();
  45. this.tbInsuFundPayRito.Text = joSettlmentInfo["pool_prop_selfpay"].Text();
  46. this.tbCvlserv_pay.Text = joSettlmentInfo["cvlserv_pay"].Text();
  47. this.tbHifes_pay.Text = joSettlmentInfo["hifes_pay"].Text();
  48. this.tbHifmi_pay.Text = joSettlmentInfo["hifmi_pay"].Text();
  49. this.tbWorkerLargeMedical.Text = joSettlmentInfo["hifob_pay"].Text();
  50. this.tbAssian.Text = joSettlmentInfo["maf_pay"].Text();
  51. this.tbOtherPay.Text = joSettlmentInfo["oth_pay"].Text();
  52. this.tbFundPaySummat.Text = joSettlmentInfo["fund_pay_sumamt"].Text();
  53. this.tbPsnSummat.Text = joSettlmentInfo["psn_part_amt"].Text();
  54. this.tbPsnAccountPaySummat.Text = joSettlmentInfo["acct_pay"].Text();
  55. this.tbPsnCashPay.Text = joSettlmentInfo["psn_cash_pay"].Text();
  56. this.tbHospitalPartAmount.Text = joSettlmentInfo["hosp_part_amt"].Text();
  57. this.tbBalc.Text = joSettlmentInfo["balc"].Text();
  58. this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].Text();
  59. this.tbClearingWay.Text = joSettlmentInfo["clr_way"].Text();
  60. this.tbClearingType.Text = joSettlmentInfo["clr_type"].Text();
  61. Global.Set.acctPay = joSettlmentInfo["acct_pay"].Text();
  62. setDgvSettlDetailHeader();
  63. dgvSetlDetail.DataSource = dtSettlmentDetail;
  64. }
  65. private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
  66. {
  67. DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
  68. newColumn.HeaderText = headerText;
  69. newColumn.Width = width;
  70. newColumn.DataPropertyName = dataPropertyName;
  71. newColumn.Name = dataPropertyName;
  72. dgv.Columns.Add(newColumn);
  73. }
  74. private void setDgvSettlDetailHeader()
  75. {
  76. AddDGVColumn(dgvSetlDetail, "基金支付类型", "fund_pay_type", 80);
  77. AddDGVColumn(dgvSetlDetail, "符合政策范围金额", "inscp_scp_amt");
  78. AddDGVColumn(dgvSetlDetail, "本次可支付限额金额", "crt_payb_lmt_amt");
  79. AddDGVColumn(dgvSetlDetail, "基金支付金额", "fund_payamt");
  80. AddDGVColumn(dgvSetlDetail, "基金支付类型名称", "fund_pay_type_name", 300);
  81. AddDGVColumn(dgvSetlDetail, "结算过程信息", "setl_proc_info", 200);
  82. dgvSetlDetail.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
  83. dgvSetlDetail.ColumnHeadersHeight = 40;
  84. }
  85. public DataTable dtSettlmentDetail;
  86. //险种
  87. public string insuType { get; set; }
  88. private void pnlPayInfo_Click(object sender, EventArgs e)
  89. {
  90. }
  91. private void uiLabel29_Click(object sender, EventArgs e)
  92. {
  93. }
  94. private void uiButton1_Click(object sender, EventArgs e)
  95. {
  96. Global.pat.mutualAidFlag = cbMutualAid.Checked;
  97. DialogResult = DialogResult.OK;
  98. }
  99. private void uiButton2_Click(object sender, EventArgs e)
  100. {
  101. DialogResult = DialogResult.Cancel;
  102. }
  103. }
  104. }