/// <summary> /// 获取期帐数据 /// </summary> public void m_mthLoadData() { this.lv.BeginUpdate(); clsDcl_Charge objSvc = new clsDcl_Charge(); DataTable dt; long l = objSvc.m_lngGetPatientDayaccountsByRegID(RegID, out dt); if (l > 0 && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { decimal val = clsPublic.ConvertObjToDecimal(dt.Rows[i]["charge_dec"]) - clsPublic.ConvertObjToDecimal(dt.Rows[i]["clearchg_dec"]); ListViewItem lvitem = new ListViewItem(" "); lvitem.SubItems.Add("第" + dt.Rows[i]["orderno_int"].ToString() + "期"); lvitem.SubItems.Add(Convert.ToDateTime(dt.Rows[i]["square_dat"].ToString()).ToString("yyyy/MM/dd HH:mm")); lvitem.SubItems.Add(clsPublic.ConvertObjToDecimal(dt.Rows[i]["charge_dec"]).ToString("###,##0.00")); lvitem.SubItems.Add(clsPublic.ConvertObjToDecimal(dt.Rows[i]["clearchg_dec"]).ToString("###,##0.00")); lvitem.SubItems.Add(val.ToString("###,##0.00")); if (val == 0) { lvitem.ForeColor = Color.RoyalBlue; } lvitem.ImageIndex = 3; lvitem.Tag = dt.Rows[i]; this.lv.Items.Add(lvitem); } } this.lv.EndUpdate(); }