private void btnConfirm_Click(object sender, EventArgs e) { if (m_blnIsAddNew) { bool blnHasSame = false; Serv::clsEMR_IntakeAndOutputVolumeSumServ objServ = (Serv::clsEMR_IntakeAndOutputVolumeSumServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(Serv::clsEMR_IntakeAndOutputVolumeSumServ)); long lngRes = objServ.m_lngCheckHasSameSummary(m_objCurrentPatient.m_StrRegisterId, Convert.ToDateTime(m_dtpCreateDate.Value.ToString("yyyy-MM-dd 00:00:00")), out blnHasSame); if (blnHasSame) { clsPublicFunction.ShowInformationMessageBox("已对" + m_dtpCreateDate.Value.ToString("yyyy年MM月dd日") + "的出入量进行过总结,请重新选择另一个时间。"); return; } } if (m_lngSave() > 0) { this.DialogResult = DialogResult.Yes; this.Close(); } }
/// <summary> /// 计算总出入量并设置到界面 /// </summary> /// <param name="p_objValue">出入量情况</param> internal void m_mthCountAndSetToUI(clsPatient p_objPatient) { if (p_objPatient == null) { return; } Serv::clsEMR_IntakeAndOutputVolumeSumServ objServ = (Serv::clsEMR_IntakeAndOutputVolumeSumServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(Serv::clsEMR_IntakeAndOutputVolumeSumServ)); clsEMR_IntakeAndOutputVolumeValue[] objValue = null; long lngRes = objServ.m_lngGetSpecifyInfo(p_objPatient.m_StrRegisterId, m_dtmRecordDate, out objValue); if (objValue == null || objValue.Length <= 0) { return; } string RegexText = @"^(-?\d+)(\.\d+)?$"; double dblAllIn = 0; double dblAllUrine = 0; double dblAllOut = 0; for (int i = 0; i < objValue.Length; i++) { if (Regex.IsMatch(objValue[i].m_strSTOOL_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strSTOOL_RIGHT); } if (Regex.IsMatch(objValue[i].m_strURINE_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strURINE_RIGHT); dblAllUrine += double.Parse(objValue[i].m_strURINE_RIGHT); } if (Regex.IsMatch(objValue[i].m_strGASTRICJUICE_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strGASTRICJUICE_RIGHT); } if (Regex.IsMatch(objValue[i].m_strBILE_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strBILE_RIGHT); } if (Regex.IsMatch(objValue[i].m_strINTESTINALJUICE_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strINTESTINALJUICE_RIGHT); } if (Regex.IsMatch(objValue[i].m_strCHESTFLUID_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strCHESTFLUID_RIGHT); } if (Regex.IsMatch(objValue[i].m_strOTHEROUTPUT_RIGHT, RegexText)) { dblAllOut += double.Parse(objValue[i].m_strOTHEROUTPUT_RIGHT); } if (Regex.IsMatch(objValue[i].m_strDRINKINGWATER_RIGHT, RegexText)) { dblAllIn += double.Parse(objValue[i].m_strDRINKINGWATER_RIGHT); } if (Regex.IsMatch(objValue[i].m_strFOOD_RIGHT, RegexText)) { dblAllIn += double.Parse(objValue[i].m_strFOOD_RIGHT); } if (Regex.IsMatch(objValue[i].m_strTRANSFUSION_RIGHT, RegexText)) { dblAllIn += double.Parse(objValue[i].m_strTRANSFUSION_RIGHT); } if (Regex.IsMatch(objValue[i].m_strSUGARWATER_RIGHT, RegexText)) { dblAllIn += double.Parse(objValue[i].m_strSUGARWATER_RIGHT); } if (Regex.IsMatch(objValue[i].m_strSALINEWATER_RIGHT, RegexText)) { dblAllIn += double.Parse(objValue[i].m_strSALINEWATER_RIGHT); } if (Regex.IsMatch(objValue[i].m_strOTHERINTAKE_RIGHT, RegexText)) { dblAllIn += double.Parse(objValue[i].m_strOTHERINTAKE_RIGHT); } } m_txtAllIntake.Text = dblAllIn.ToString(); m_txtAllOutput.Text = dblAllOut.ToString(); m_txtAllUrine.Text = dblAllUrine.ToString(); }