/// <summary> /// 关联未交费用处方号到住院信息表里 /// </summary> internal void m_lngInsertPatientNopayRecipeZY() { if (this.m_objViewer.m_dgvResult.RowCount > 0) { int intRowCount = this.m_objViewer.m_dgvResult.RowCount; List <clsRecipeNoPay_VO> m_lstRecipeNoPay_VO = new List <clsRecipeNoPay_VO>(); clsRecipeNoPay_VO objRecipeNoPay_vo = null; for (int i1 = 0; i1 < intRowCount; i1++) { if (this.m_objViewer.m_dgvResult.Rows[i1].Cells[0].Value.ToString().ToUpper() == "T") { objRecipeNoPay_vo = (clsRecipeNoPay_VO)this.m_objViewer.m_dgvResult.Rows[i1].Tag; m_lstRecipeNoPay_VO.Add(objRecipeNoPay_vo); } } if (m_lstRecipeNoPay_VO.Count > 0) { long lngRes = objSvc.m_lngInsertPatientNopayRecipeZY(m_lstRecipeNoPay_VO); if (lngRes > 0) { MessageBox.Show("关联成功!", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Information); this.m_mthSelect(); } else { MessageBox.Show("关联失败!", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
/// <summary> /// 重算病人门诊未交费用处方 /// </summary> internal void m_mthReSetPatientNoPayRecipe() { if (this.m_objViewer.m_dgvResult.RowCount > 0) { int intRowCount = this.m_objViewer.m_dgvResult.RowCount; List <clsRecipeNoPay_VO> m_lstRecipeNoPay_VO = new List <clsRecipeNoPay_VO>(); List <string> m_lstRecipeNoPayId = new List <string>(intRowCount); clsRecipeNoPay_VO objRecipeNoPay_vo = null; for (int i1 = 0; i1 < intRowCount; i1++) { objRecipeNoPay_vo = (clsRecipeNoPay_VO)this.m_objViewer.m_dgvResult.Rows[i1].Tag; //m_lstRecipeNoPay_VO.Add(objRecipeNoPay_vo); m_lstRecipeNoPayId.Add(objRecipeNoPay_vo.m_strRecipeid); } long lngRes = objSvc.m_lngReSetPatientNoPayRecipe(this.m_objViewer.m_txtPatientNo.Text, this.m_objViewer.m_cboType.SelectedIndex, m_lstRecipeNoPayId, out m_lstRecipeNoPay_VO); if (m_lstRecipeNoPay_VO.Count > 0) { this.m_mthFillData(m_lstRecipeNoPay_VO); } else { this.m_objViewer.m_dgvResult.Rows.Clear(); MessageBox.Show("已重算,无未交门诊处方费用", "提示框", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
/// <summary> /// 填充dataGridView /// </summary> /// <param name="p_lstRecipeNoPay_VO">返回病人数据</param> internal void m_mthFillData(List <clsRecipeNoPay_VO> p_lstRecipeNoPay_VO) { this.m_objViewer.m_dgvResult.Rows.Clear(); int intCount = p_lstRecipeNoPay_VO.Count; int intDgvRow = 0;//datagridView操作行 clsRecipeNoPay_VO objRecipeNoPay_vo = null; for (int i = 0; i < intCount; i++) { objRecipeNoPay_vo = p_lstRecipeNoPay_VO[i]; string[] sarr = new string[5]; sarr[0] = "F"; sarr[1] = objRecipeNoPay_vo.m_strRegisterid; sarr[2] = objRecipeNoPay_vo.m_strRecipeid; if (objRecipeNoPay_vo.m_intRecipeflag == 1) { sarr[3] = "正方"; } else if (objRecipeNoPay_vo.m_intRecipeflag == 2) { sarr[3] = "副方"; } sarr[4] = objRecipeNoPay_vo.m_dtmRecorddate.ToString("yyyy年MM月dd日 hh:mm:ss"); this.m_objViewer.m_dgvResult.Rows.Add(sarr); this.m_objViewer.m_dgvResult.Rows[intDgvRow].Tag = objRecipeNoPay_vo; intDgvRow++; } }