Ejemplo n.º 1
0
        /// <summary>
        /// 执行打印
        /// </summary>
        /// <returns></returns>
        private bool toPrint()
        {
            string strInfo = viewModel.GetPrintTipInfo(ordPrintDO_Pat.Id_orprn);

            if (this.IsContinue("提示", strInfo))
            {
                //获取打印数据,添加页号、行号、行数、打印日期、打印部门、打印人员
                viewModel.GetPrintDOsFromPreviewDOs(this.Context.Dept.Id_dep, this.Context.PsnInfo.Id_psndoc, ordPrintDO_Pat.Id_orprn);

                TemplAndDataLogicAssist prtLogic = new TemplAndDataLogicAssist();
                prtLogic.loadPrtTempl("46106015", (ordPrintDO_Pat.Fg_long == null || ordPrintDO_Pat.Fg_long == true) ? "医嘱单打印长期" : "医嘱单打印临时");
                //prtLogic.loadPrtDataAsAgg(new BaseDO[] { null }, viewModel.ArryOrdPrintDOsPrint, viewModel.PrtDORowsAssistPrint, true);
                prtLogic.loadPrtDataAsAgg(new BaseDO[] { null }, viewModel.ArryOrdPrintDOsPreview, viewModel.PrtDORowsAssistPreview, true);
                if (prtLogic.doPrint(true))
                {
                    viewModel.SavePrintData(ordPrintDO_Pat.Id_orprn);
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        //打印   ent4bannerdto,ciordconsrptdo,ordapconsdo,ciorder
        public void ToPrint()
        {
            if (this.ent4BannerDTO == null || this.aggDo == null)
            {
                return;
            }
            List <BaseDO> lstDataSources = new List <BaseDO>();

            this.ciOrderDO = this.ciordService.findById(aggDo.getParentDO().Id_or);
            //this.rptDO = this.rptService.find(" id_id_apcons='" + aggDo.getParentDO().Id_apcons+ "'", null, null)[0];

            lstDataSources.Add(this.ent4BannerDTO);
            lstDataSources.Add(this.rptDO);
            lstDataSources.Add(this.aggDo.getParentDO());
            lstDataSources.Add(this.ciOrderDO);

            TemplAndDataLogicAssist prtLogic = new TemplAndDataLogicAssist();
            bool clearData = true;
            bool res       = prtLogic.loadPrtTempl("461020", "会诊记录打印");

            if (!res)
            {
                this.ShowAlert(prtLogic.getLastErrMsg());
                return;
            }

            res = prtLogic.loadPrtDataAsAgg(lstDataSources.ToArray(), this.aggDo.getCiordInviteConsDO(), new PrtDORowsAssist(0), clearData);
            if (!res)
            {
                this.ShowAlert(prtLogic.getLastErrMsg());
                return;
            }
            clearData = false;
            //prtLogic.loadPrtDataSingle(ent4BannerDto);
            //prtLogic.loadPrtDataAsAgg(ent4BannerDto, lstDOs.ToArray(), true);
            //prtLogic.loadPrtDataBatch(lstDOs.ToArray());
            prtLogic.doPrint(true);
            clearData = true;
            //prtLogic.doPrint(true);
        }