/// <summary>
 /// 设置打印内容。(当数据已经存在时使用。)
 /// </summary>
 /// <param name="p_objPrintContent">打印内容</param>
 public void m_mthSetPrintContent(object p_objPrintContent)
 {
     m_blnWantInit = false;
     if (p_objPrintContent.GetType().Name != "clsPrintInfo_ShuXueZhiLiaoyes_xj")
     {
         clsPublicFunction.ShowInformationMessageBox("参数错误");
         return;
     }
     m_blnIsFromDataSource = false;//表明是从文件直接提取信息
     m_objPrintInfo        = (clsPrintInfo_ShuXueZhiLiaoyes_xj)p_objPrintContent;
     m_objRecordContent    = m_objPrintInfo.m_objRecordContent;
     m_mthSetPrintValue();
 }
Exemple #2
0
        //infPrintRecord objPrintTool;
        protected override void m_mthSubPreviewInactiveRecord(IWin32Window p_infOwner, clsInactiveRecordInfo_VO p_objSelectedValue)
        {
            if (p_objSelectedValue == null)
            {
                return;
            }
            objPrintTool = new clsShuXueZhiLiaoyesPrintTool_xj();

            if (m_objBaseCurrentPatient != null)
            {
                objPrintTool.m_mthInitPrintTool(null);
                objPrintTool.m_mthSetPrintInfo(m_objBaseCurrentPatient,
                                               p_objSelectedValue.m_DtmInpatientDate,
                                               p_objSelectedValue.m_DtmOpenDate);
                clsPrintInfo_ShuXueZhiLiaoyes_xj objPrintInfo = new clsPrintInfo_ShuXueZhiLiaoyes_xj();


                //objPrintInfo.m_dtmHISInDate = p_objSelectedValue.m_DtmInpatientDate;  //???BEFOREOPERATION
                objPrintInfo.m_dtmInPatientDate = p_objSelectedValue.m_DtmInpatientDate;
                objPrintInfo.m_dtmOpenDate      = p_objSelectedValue.m_DtmOpenDate;
                //objPrintInfo.m_strAge = p_objSelectedValue;
                //objPrintInfo.m_strAreaName
                //objPrintInfo.m_strBedName
                //objPrintInfo.m_strDeptName=
                //objPrintInfo.m_strHISInPatientID=
                objPrintInfo.m_strInPatentID = p_objSelectedValue.m_StrInpatientId;
                //objPrintInfo.m_strPatientName =
                //objPrintInfo.m_strSex=


                clsTrackRecordContent p_objContent = new clsShuXueZhiLiaoyesContent_xj();
                long lngRes = m_objGetDiseaseTrackDomain().m_lngGetDeleteRecordContent(p_objSelectedValue.m_StrInpatientId, p_objSelectedValue.m_DtmInpatientDate.ToString("yyyy-MM-dd HH:mm:ss"), p_objSelectedValue.m_DtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss"), out p_objContent);
                clsShuXueZhiLiaoyesContent_xj objContent = (clsShuXueZhiLiaoyesContent_xj)p_objContent;
                //objPrintInfo.m_objContent = objContent;
                objPrintInfo.m_objRecordContent = objContent;
                //objPrintInfo.m_blnIsFirstPrint = false;

                objPrintTool.m_mthSetPrintContent(objPrintInfo);



                m_mthStartPrint();
                //ppdPrintPreview.Document = m_pdcPrintDocument;
                //ppdPrintPreview.ShowDialog(p_infOwner);
            }
        }
        /// <summary>
        /// 设置打印信息(当从数据库读取时要首先调用.)
        /// </summary>
        /// <param name="p_objPatient">病人</param>
        /// <param name="p_dtmInPatientDate">入院日期</param>
        /// <param name="p_dtmOpenDate">OpenDate,如果是一次打印多次记录表单的类型(如病案记录),忽略OpenDate</param>
        public void m_mthSetPrintInfo(clsPatient p_objPatient, DateTime p_dtmInPatientDate, DateTime p_dtmOpenDate)
        {
            m_blnIsFromDataSource = true;//表明是从数据库读取
            clsPatient m_objPatient = p_objPatient;

            m_objPrintInfo = new clsPrintInfo_ShuXueZhiLiaoyes_xj();
            m_objPrintInfo.m_strInPatentID  = m_objPatient != null ? m_objPatient.m_StrInPatientID : "";
            m_objPrintInfo.m_strPatientName = m_objPatient != null ? m_objPatient.m_ObjPeopleInfo.m_StrFirstName : "";
            m_objPrintInfo.m_strSex         = m_objPatient != null ? m_objPatient.m_ObjPeopleInfo.m_StrSex : "";
            m_objPrintInfo.m_strAge         = m_objPatient != null ? m_objPatient.m_ObjPeopleInfo.m_StrAge : "";
            m_objPrintInfo.m_strBedName     = m_objPatient != null ? m_objPatient.m_ObjInBedInfo.m_ObjLastBedInfo.m_ObjBed.m_StrBedName : "";
            m_objPrintInfo.m_strDeptName    = m_objPatient != null?m_objPatient.m_ObjInBedInfo.m_objGetSessionByInDate(p_dtmInPatientDate).m_ObjLastDept.m_ObjDept.m_StrDeptName : "";

            m_objPrintInfo.m_strAreaName = m_objPatient != null?m_objPatient.m_ObjInBedInfo.m_objGetSessionByInDate(p_dtmInPatientDate).m_ObjLastDept.m_ObjLastArea.m_ObjArea.m_StrAreaName : "";

            m_objPrintInfo.m_dtmInPatientDate  = p_dtmInPatientDate;
            m_objPrintInfo.m_dtmOpenDate       = p_dtmOpenDate;
            m_objPrintInfo.m_dtmHISInDate      = m_objPatient != null ? m_objPatient.m_DtmSelectedHISInDate : DateTime.MinValue;
            m_objPrintInfo.m_strHISInPatientID = m_objPatient != null ? m_objPatient.m_StrHISInPatientID : "";

            m_mthGetPrintMarkConfig();
        }