| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.ComponentModel;
 
- using System.Data;
 
- using System.Drawing;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Windows.Forms;
 
- using Newtonsoft.Json.Linq;
 
- using PTMedicalInsurance.Variables;
 
- using PTMedicalInsurance.Business;
 
- using PTMedicalInsurance.Helper;
 
- namespace PTMedicalInsurance.Forms
 
- {
 
-     public partial class SettlementInfo : Form
 
-     {
 
-         //1.声明自适应类实例
 
-         AutoResizeForm asc = new AutoResizeForm();
 
-         public DataTable dtSettlmentDetail;
 
-         //险种
 
-         public string insuType { get; set; }
 
-         public SettlementInfo()
 
-         {
 
-             InitializeComponent();
 
-             //this.StartPosition = FormStartPosition.CenterParent;
 
-             asc.controllInitializeSize(this);
 
-             asc.controlAutoSize(this);
 
-         }
 
-         public string DefutValue(string InValue)
 
-         {
 
-             string sRtn = "0";
 
-             if (InValue == "")
 
-                 return sRtn;
 
-             else
 
-                 return InValue;
 
-         }
 
-         public SettlementInfo(JObject jo)
 
-         {
 
-             InitializeComponent();
 
-             JObject joSettlmentInfo = JObject.FromObject(jo["setlinfo"]);
 
-             dtSettlmentDetail = (DataTable)jo["setldetail"].ToObject(typeof(DataTable));
 
-             this.tbAdmCertType.Text = joSettlmentInfo["mdtrt_cert_type"].ToString();
 
-             this.tbPsnCertType.Text = joSettlmentInfo["psn_cert_type"].ToString();
 
-             this.tbPsnCertNO.Text = joSettlmentInfo["certno"].ToString();
 
-             this.tbInsuType.Text = joSettlmentInfo["insutype"].ToString();
 
-             this.tbPersonType.Text = joSettlmentInfo["psn_type"].ToString();
 
-             this.tbMedType.Text = joSettlmentInfo["med_type"].ToString();
 
-             this.tbSumamt.Text = joSettlmentInfo["medfee_sumamt"].ToString();
 
-             this.tbFullOwnPay.Text = joSettlmentInfo["fulamt_ownpay_amt"].ToString();
 
-             this.tbOverLimitOwnPay.Text = joSettlmentInfo["overlmt_selfpay"].ToString();
 
-             this.tbPreSelfPay.Text = joSettlmentInfo["preselfpay_amt"].ToString();
 
-             this.tbInScopyAmount.Text = joSettlmentInfo["inscp_scp_amt"].ToString();
 
-             this.tbActualPayDeduLine.Text = joSettlmentInfo["act_pay_dedc"].ToString();
 
-             this.tbInsuFundPay.Text = joSettlmentInfo["hifp_pay"].ToString();
 
-             this.tbInsuFundPayRito.Text = joSettlmentInfo["pool_prop_selfpay"].ToString();
 
-             this.tbCvlserv_pay.Text = joSettlmentInfo["cvlserv_pay"].ToString();
 
-             this.tbHifes_pay.Text = joSettlmentInfo["hifes_pay"].ToString();
 
-             this.tbHifmi_pay.Text = joSettlmentInfo["hifmi_pay"].ToString();
 
-             this.tbWorkerLargeMedical.Text = joSettlmentInfo["hifob_pay"].ToString();
 
-             this.tbAssian.Text = joSettlmentInfo["maf_pay"].ToString();
 
-             this.tbOtherPay.Text = joSettlmentInfo["oth_pay"].ToString();
 
-             this.tbFundPaySummat.Text = joSettlmentInfo["fund_pay_sumamt"].ToString();
 
-             this.tbPsnSummat.Text = joSettlmentInfo["psn_part_amt"].ToString();
 
-             this.tbPsnAccountPaySummat.Text = joSettlmentInfo["acct_pay"].ToString();
 
-             this.tbPsnCashPay.Text = joSettlmentInfo["psn_cash_pay"].ToString();
 
-             this.tbHospitalPartAmount.Text = joSettlmentInfo["hosp_part_amt"].ToString();
 
-             this.tbBalc.Text = joSettlmentInfo["balc"].ToString();
 
-             this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].ToString();
 
-             this.tbClearingWay.Text = joSettlmentInfo["clr_way"].ToString();
 
-             this.tbClearingType.Text = joSettlmentInfo["clr_type"].ToString();
 
-             this.tbCommercialReimamt.Text = joSettlmentInfo["commercial_reimamt"].ToString();
 
-             this.tbCommercialRenflag.Text = joSettlmentInfo["commercial_renflag"].ToString();
 
-             JObject joExpContent = JObject.Parse(joSettlmentInfo["exp_content"].ToString());
 
-             tbMedInsWalletBalance.Text = JsonHelper.getDestValue(joExpContent, "medIns_wallet_balance");
 
-             tbMedInsWalletPay.Text = JsonHelper.getDestValue(joExpContent, "medIns_wallet_pay");
 
-             Global.Set.acctPay = joSettlmentInfo["acct_pay"].ToString();
 
-             setDgvSettlDetailHeader();
 
-             dgvSetlDetail.DataSource = dtSettlmentDetail;           
 
-         }
 
-         private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
 
-         {
 
-             DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
 
-             newColumn.HeaderText = headerText;
 
-             newColumn.Width = width;
 
-             newColumn.DataPropertyName = dataPropertyName;
 
-             newColumn.Name = dataPropertyName;
 
-             dgv.Columns.Add(newColumn);
 
-         }
 
-         private void  setDgvSettlDetailHeader()
 
-         {
 
-             AddDGVColumn(dgvSetlDetail, "基金支付类型", "fund_pay_type", 80);
 
-             AddDGVColumn(dgvSetlDetail, "符合政策范围金额", "inscp_scp_amt");
 
-             AddDGVColumn(dgvSetlDetail, "本次可支付限额金额", "crt_payb_lmt_amt");
 
-             AddDGVColumn(dgvSetlDetail, "基金支付金额", "fund_payamt");
 
-             AddDGVColumn(dgvSetlDetail, "基金支付类型名称", "fund_pay_type_name", 300);
 
-             AddDGVColumn(dgvSetlDetail, "结算过程信息", "setl_proc_info", 200);
 
-             dgvSetlDetail.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
 
-             dgvSetlDetail.ColumnHeadersHeight = 40;
 
-         }
 
-         private void uiButton1_Click(object sender, EventArgs e)
 
-         {
 
-             decimal fYBZFJE, fYYCDJE, fJJZFJE;
 
-             fYYCDJE = decimal.Parse(DefutValue(tbHospitalPartAmount.Text));
 
-             fJJZFJE = decimal.Parse(DefutValue(tbFundPaySummat.Text));
 
-             Global.Set.fZFY = tbSumamt.Text;
 
-             Global.Set.fZHZFJE = DefutValue(tbPsnAccountPaySummat.Text);
 
-             Global.Set.fYBZFJE = (fYYCDJE + fJJZFJE).ToString();
 
-             DialogResult = DialogResult.OK;
 
-         }
 
-         private void uiButton2_Click(object sender, EventArgs e)
 
-         {
 
-             DialogResult = DialogResult.Cancel;
 
-         }
 
-     }
 
- }
 
 
  |