/// <summary> /// 从数据库初始化打印内容。如果没有记录,打印空报表。(当从数据库读取时要调用.) /// </summary> public void m_mthInitPrintContent() { m_blnWantInit = false; // if (m_objPrintInfo == null) { MDIParent.ShowInformationMessageBox("调用m_mthInitPrintContent之前请首先调用m_mthSetPrintInfo函数"); return; } if (m_objPrintInfo.m_strInPatentID == "" || m_objPrintInfo.m_dtmOpenDate == DateTime.MinValue) { m_objclsBeforeOperationSummary_All = null; } else { m_objRecordsDomain = new clsBeforeOperationSummaryDomain(); long lngRes = m_objRecordsDomain.m_lngGetSummary_All(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 m_objclsBeforeOperationSummary_All); if (lngRes <= 0) { return; } } //设置表单内容到打印中 m_objPrintInfo.m_objclsBeforeOperationSummary_All = m_objclsBeforeOperationSummary_All; m_mthSetPrintValue(); //无论有否打印数据,即使在打印空白表时,此行也必须执行. }
/// <summary> /// 设置打印内容。(当数据已经存在时使用。) /// </summary> /// <param name="p_objPrintContent">打印内容</param> public void m_mthSetPrintContent(object p_objPrintContent) { m_blnWantInit = false; if (p_objPrintContent.GetType().Name != "clsPrintInfo_BeforeOperationSummary") { MDIParent.ShowInformationMessageBox("参数错误"); } m_blnIsFromDataSource = false; //表明是从文件直接提取信息 m_objPrintInfo = (clsPrintInfo_BeforeOperationSummary)p_objPrintContent; m_objclsBeforeOperationSummary_All = m_objPrintInfo.m_objclsBeforeOperationSummary_All; m_mthSetPrintValue(); }
///查出时间对应的主表信息 public long m_lngGetDeletedSummary_All(string p_strInPatientID, string p_strInPatientDate, string p_strCreateDate, out clsBeforeOperationSummary_All objclsBeforeOperationSummary_All) { objclsBeforeOperationSummary_All = null; string strXML = ""; int intRows = 0; clsBeforeOperationSummaryService m_objService = (clsBeforeOperationSummaryService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsBeforeOperationSummaryService)); long lngRes = 0; try { lngRes = m_objService.m_lngGetDeletedSummaryInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strInPatientID, p_strInPatientDate, p_strCreateDate, out strXML, out intRows); if (intRows > 0) { objclsBeforeOperationSummary_All = new clsBeforeOperationSummary_All(); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo = new clsBeforeOperationSummaryInfo(); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo = new clsBeforeOperationSummaryContentInfo(); XmlTextReader objReader = new XmlTextReader(strXML, XmlNodeType.Element, m_objXmlParser); objReader.WhitespaceHandling = WhitespaceHandling.None; while (objReader.Read()) { switch (objReader.NodeType) { case XmlNodeType.Element: if (objReader.HasAttributes) { objclsBeforeOperationSummary_All.m_strFirstPrintDate = objReader.GetAttribute("FIRSTPRINTDATE"); //首次打印时间 objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strInPatientID = p_strInPatientID; objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strInPatientDate = p_strInPatientDate; objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strCreateDate = p_strCreateDate; objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strOpenDate = DateTime.Parse(objReader.GetAttribute("OPENDATE")).ToString("yyyy-MM-dd HH:mm:ss"); if (objReader.GetAttribute("FIRSTPRINTDATE") == "") { objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strFirstPrintDate = ""; } else { objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strFirstPrintDate = DateTime.Parse(objReader.GetAttribute("FIRSTPRINTDATE")).ToString("yyyy-MM-dd HH:mm:ss"); } objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strCreateID = objReader.GetAttribute("CREATEID"); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strAfterNoticeXml = objReader.GetAttribute("AFTERNOTICEXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strAnaesthesiaXml = objReader.GetAttribute("ANAESTHESIAXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strBodyInfoXml = objReader.GetAttribute("BODYINFOXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strConfirmReason = objReader.GetAttribute("CONFIRMREASON").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strConfirmReasonXMLString = objReader.GetAttribute("CONFIRMREASONXMLSTRING").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strDiagnoseGistXml = objReader.GetAttribute("DIAGNOSEGISTXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strDiagnoseXml = objReader.GetAttribute("DIAGNOSEXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strDiscussNotionXml = objReader.GetAttribute("DISCUSSNOTIONXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strPatientNotionXml = objReader.GetAttribute("PATIENTNOTIONXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strPreparationXml = objReader.GetAttribute("PREPARATIONXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryInfo.m_strSpecialHandleXml = objReader.GetAttribute("SPECIALHANDLEXML").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strInPatientID = p_strInPatientID; objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strInPatientDate = p_strInPatientDate; objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strOpenDate = objReader.GetAttribute("OPENDATE"); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strModifyUserID = objReader.GetAttribute("MODIFYUSERID"); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strModifyDate = DateTime.Parse(objReader.GetAttribute("MODIFYDATE")).ToString("yyyy-MM-dd HH:mm:ss"); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strOperateDoctorID = objReader.GetAttribute("OPERATEDOCTORID"); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strChargeDoctorID = objReader.GetAttribute("CHARGEDOCTORID"); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strOperateDoctorName = objReader.GetAttribute("OPERATEDOCTORNAME").Replace('き', '\'').Trim(); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strChargeDoctorName = objReader.GetAttribute("CHARGEDOCTORNAME").Replace('き', '\'').Trim(); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strDiagnose = objReader.GetAttribute("DIAGNOSE").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strDiagnoseGist = objReader.GetAttribute("DIAGNOSEGIST").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strBodyInfo = objReader.GetAttribute("BODYINFO").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strSpecialHandle = objReader.GetAttribute("SPECIALHANDLE").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strPreparation = objReader.GetAttribute("PREPARATION").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strPatientNotion = objReader.GetAttribute("PATIENTNOTION").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strAnaesthesia = objReader.GetAttribute("ANAESTHESIA").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strAfterNotice = objReader.GetAttribute("AFTERNOTICE").Replace('き', '\''); objclsBeforeOperationSummary_All.m_objclsBeforeOperationSummaryContentInfo.m_strDiscussNotion = objReader.GetAttribute("DISCUSSNOTION").Replace('き', '\''); } break; } } } } finally { //m_objService.Dispose(); } return(lngRes); }