private void m_lsvDeactiveInfo_DoubleClick(object sender, System.EventArgs e) { if (m_lsvDeactiveInfo.SelectedItems.Count == 0) { return; } clsDeactiveInfo objDeactiveInfo = (clsDeactiveInfo)m_lsvDeactiveInfo.SelectedItems[0].Tag; clsDeactiveFormInfo objFormInfo = (clsDeactiveFormInfo)m_cboFormType.Tag; m_objBaseCurrentPatient.m_DtmSelectedInDate = objDeactiveInfo.m_dtmSelectedInDate; frmHRPBaseForm objBaseForm = m_objBaseForm; if (objBaseForm == null) { Type typForm = Type.GetType(objFormInfo.m_strMainFormClassName); //如果没有不需参数的构造函数则爆 objBaseForm = (frmHRPBaseForm)Activator.CreateInstance(typForm); objBaseForm.m_BlnIfNewDeletedRecord = true; objBaseForm.MdiParent = clsEMRLogin.s_FrmMDI; this.MdiParent = clsEMRLogin.s_FrmMDI; objBaseForm.WindowState = FormWindowState.Maximized; objBaseForm.Show(); objBaseForm.TopMost = true; } bool blnIsRecordBase = false; frmRecordsBase frmRB = null; if (objBaseForm is frmDiseaseTrackBase) { for (int i = 0; i < clsEMRLogin.s_FrmMDI.MdiChildren.Length; i++) { if (clsEMRLogin.s_FrmMDI.MdiChildren[i] is frmRecordsBase) { if (((frmRecordsBase)clsEMRLogin.s_FrmMDI.MdiChildren[i]).m_FrmCurrentSub != null && ((frmRecordsBase)clsEMRLogin.s_FrmMDI.MdiChildren[i]).m_FrmCurrentSub.Equals(objBaseForm)) { frmRB = (frmRecordsBase)clsEMRLogin.s_FrmMDI.MdiChildren[i]; blnIsRecordBase = true; } } } } if (!blnIsRecordBase) { objBaseForm.m_mthSetDeactiveContent(m_objBaseCurrentPatient, objDeactiveInfo.m_dtmPrimaryDate, objFormInfo.m_intFormID); MDIParent.s_ObjSaveCue.m_mthRemoveForm(objBaseForm); } else if (frmRB != null) { frmRB.m_mthSetDeactiveContent(m_objBaseCurrentPatient, objDeactiveInfo.m_dtmPrimaryDate, objFormInfo.m_intFormID); } //objBaseForm.Close(); this.Close(); // this.Dispose(); }
private void m_mthSearch() { clsDeactiveFormInfo objFormInfo = (clsDeactiveFormInfo)m_cboFormType.SelectedItem; if (objFormInfo == null || m_objBaseCurrentPatient == null) { return; } m_cboFormType.Tag = objFormInfo; clsDeactiveInfo [] objDeactiveInfoArr; long lngRes = m_objDeactiveDomain.m_lngGetDeactiveInfo(m_objBaseCurrentPatient.m_StrInPatientID, m_objBaseCurrentPatient.m_DtmSelectedInDate.ToString("yyyy-MM-dd HH:mm:ss"), objFormInfo.m_intFormID, out objDeactiveInfoArr); if (lngRes <= 0 || objDeactiveInfoArr == null || objDeactiveInfoArr.Length <= 0) { clsPublicFunction.ShowInformationMessageBox("未找到已删除的记录!"); return; } else if (lngRes > 0) { m_lsvDeactiveInfo.Items.Clear(); if (objDeactiveInfoArr != null) { for (int i = 0; i < objDeactiveInfoArr.Length; i++) { ListViewItem lviDeactiveInfo = new ListViewItem( new string[] { objDeactiveInfoArr[i].m_dtmCreateDate.ToString("yyyy年MM月dd日 HH:mm:ss"), objDeactiveInfoArr[i].m_strDeactiveUserName, objDeactiveInfoArr[i].m_dtmDeactiveDate.ToString("yyyy年MM月dd日 HH:mm:ss") }); lviDeactiveInfo.Tag = objDeactiveInfoArr[i]; m_lsvDeactiveInfo.Items.Add(lviDeactiveInfo); } m_mthChangeListViewLastColumnWidth(m_lsvDeactiveInfo, 15); } } }
public void m_mthSetForm(frmHRPBaseForm p_objBaseForm) { m_objBaseForm = null; for (int i = 0; i < m_cboFormType.GetItemsCount(); i++) { clsDeactiveFormInfo objFormInfo = (clsDeactiveFormInfo)m_cboFormType.GetItem(i); if (objFormInfo.m_intFormID == p_objBaseForm.m_IntFormID) { m_cboFormType.SelectedIndex = i; m_objBaseForm = p_objBaseForm; break; } } m_cboFormType.Enabled = false; m_mthSearch(); }