/// <summary> /// 当打开窗体时load数据 /// </summary> private void m_mthLoad() { clsMiniBloodSugarChk_GXServ objservice = (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ)); //检查参数 if (strRecordInPatientID == null || strRecordInPatientID == string.Empty) { MessageBox.Show("未指定记录", "iCare message", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } try { long lngRes = objservice.m_lngGetRecoedByInPatient(null, strRecordInPatientID, DateTime.Parse(strRecordInPatientDate), DateTime.Parse(strRecordCreateDate), out m_objRecord); if (m_objRecord != null) { m_mthSetGUIFromContent(m_objRecord); m_mthEnableModify(false); m_mthSetModifyControl(m_objRecord, false); } } catch (Exception) { throw; } finally { objservice = null; } }
/// <summary> /// 重写treeview事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void m_trvInPatientDate_AfterSelect(object sender, TreeViewEventArgs e) { clsMiniBloodSugarChk_GXServ objservice = (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ)); try { //清空病人记录信息 m_mthClearPatientRecordInfo(); if (m_trvInPatientDate.SelectedNode == null || m_trvInPatientDate.SelectedNode == m_trvInPatientDate.Nodes[0] || m_objCurrentPatient == null) { return; } m_objCurrentPatient.m_DtmSelectedInDate = DateTime.Parse(m_trvInPatientDate.SelectedNode.Text); //获取病人记录列表 clsTransDataInfo[] objTansDataInfoArr; string m_strInPatientID = m_objCurrentPatient.m_StrInPatientID; string m_strInPatientDate = m_trvInPatientDate.SelectedNode.Text; //m_objCurrentPatient.m_ObjInBedInfo.m_ObjLastSessionInfo.m_DtmInDate.ToString("yyyy-MM-dd HH:mm:ss"); //获取指定入院时间的记录列表 DataTable dt = new DataTable(); long lngRes = objservice.m_lngGetRecoedByInPatient(null, m_strInPatientID, DateTime.Parse(m_strInPatientDate), out dt); if (dt != null) { dgvRecords.DataSource = dt; } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }
/// <summary> /// /// </summary> /// <param name="p_strInPatientID"></param> /// <param name="p_dtmInPatientDate"></param> /// <param name="p_objValues"></param> /// <returns></returns> public long m_lngGetRecoedByInPatient(string p_strInPatientID, DateTime p_dtmInPatientDate, out clsMiniBloodSugarChkValue_GX[] p_objValues) { clsMiniBloodSugarChk_GXServ m_objServ = (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ)); long lngResult = 0; try { lngResult = m_objServ.m_lngGetRecoedByInPatient(p_strInPatientID, p_dtmInPatientDate, out p_objValues); } finally { //m_objServ.Dispose(); } return(lngResult); }