private void frmEMR_OPInstrumentQty_Load(object sender, EventArgs e) { clsEMR_OPInstrumentDomain objDomain = new clsEMR_OPInstrumentDomain(); long lngRes = objDomain.m_lngGetActiveItemsFromDict(out m_objDictArr); m_mthSetActiveItemList(); }
/// <summary> /// 从数据库初始化打印内容。如果没有记录,打印空报表。(当从数据库读取时要调用.) /// </summary> public void m_mthInitPrintContent() { m_blnWantInit = false;// if (m_objPrintInfo == null) { clsPublicFunction.ShowInformationMessageBox("调用m_mthInitPrintContent之前请首先调用m_mthSetPrintInfo函数"); return; } clsEMR_OPInstrumentDomain m_objRecordsDomain = new clsEMR_OPInstrumentDomain(); long lngRes = m_objRecordsDomain.m_lngGetActiveItemsFromDict(out m_objDict); if (m_objPrintInfo.m_strInPatentID == "" || m_objPrintInfo.m_dtmOpenDate == DateTime.MinValue) { m_objRecordContent = null; } else { clsTrackRecordContent objContent = new clsTrackRecordContent(); lngRes = m_objRecordsDomain.m_lngGetRecordContent(m_objPrintInfo.m_strInPatentID, m_objPrintInfo.m_dtmInPatientDate.ToString("yyyy-MM-dd HH:mm:ss"), m_objPrintInfo.m_dtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss"), out objContent); if (lngRes <= 0) { return; } m_objRecordContent = (clsEMR_OPInstrument)objContent; } m_objRecordsDomain = null; //设置表单内容到打印中 m_objPrintInfo.m_objRecordContent = m_objRecordContent; }
/// <summary> /// 查询并显示字典表已启用项目 /// </summary> private void m_mthLoadActiveItems() { try { this.Cursor = Cursors.WaitCursor; m_lsvActiveItem.Items.Clear(); clsEMR_OPInstrumentDomain objDomain = new clsEMR_OPInstrumentDomain(); long lngRes = objDomain.m_lngGetActiveItemsFromDict(out m_objActiveItems); if (m_objActiveItems == null || m_objActiveItems.Length <= 0) { return; } m_lsvActiveItem.BeginUpdate(); m_dtbActiveItems.BeginLoadData(); for (int i = 0; i < m_objActiveItems.Length; i++) { int intOrder = m_objActiveItems[i].m_intOrderID == -1 ? i + 1 : m_objActiveItems[i].m_intOrderID + 1; ListViewItem item = new ListViewItem(intOrder.ToString()); item.SubItems.Add(m_objActiveItems[i].m_strOPInstrumentName); item.Tag = m_objActiveItems[i]; m_lsvActiveItem.Items.Add(item); object[] objItem = new object[] { m_objActiveItems[i].m_intOrderID, m_objActiveItems[i].m_strOPInstrumentName }; m_dtbActiveItems.LoadDataRow(objItem, true); } m_lsvActiveItem.EndUpdate(); m_dtbActiveItems.EndLoadData(); } catch (Exception ex) { clsPublicFunction.ShowInformationMessageBox("发生如下错误\r\n" + ex.Message); } finally { this.Cursor = Cursors.Default; } }