• 显示单据信息(类似打印)


    展示效果

    代码

    /// <summary>
            /// 处方签展示
            /// </summary>
            private void PrescriptionLabelDisplay()
            {
                ///处方签
                if (tbDtl.SelectedTab == tpPrescriptionLabel)
                {
    
                    #region 获取主单据信息
                    ChgDtlVo chg = dgvBill.Grid.ActiveRow?.ListObject as ChgDtlVo ?? new ChgDtlVo();
                    List<ChgDtlVo> chgList = new List<ChgDtlVo>();
                    chgList.Add(chg);
                    DataTable chgDtlVoMian = GeneralPrint.GetInstance.List2DataTable<ChgDtlVo>(chgList);
                    #endregion
    
                    #region 获取单据明细信息
                    List<ChgDtlVo> dtlDatas = dgvDtl.DataSource as List<ChgDtlVo> ?? new List<ChgDtlVo>();
                    DataTable dtlDt = GeneralPrint.GetInstance.List2DataTable<ChgDtlVo>(dtlDatas);
                    #endregion 获取单据明细信息
    
                    #region 获取用户信息
                    PrintArgs printArgs = new PrintArgs();
                    if (odPatient?.OdAppnoList?.Count > 0)
                    {
                        foreach (var s in odPatient?.OdAppnoList)
                        {
                            odPatient.OdAppnoListStr = $"【{s}】";
                        }
                    }
                    List<OdExecPatientVo> opUserInfo = new List<OdExecPatientVo>();
                    opUserInfo.Add(odPatient);
                    DataTable UserInfo = GeneralPrint.GetInstance.List2DataTable<OdExecPatientVo>(opUserInfo);
                    #endregion 获取用户信息 
                    Dictionary<string, object> dictionary = new Dictionary<string, object>();
                    dictionary.Add("ChgDtlVoList", dtlDt);
                    dictionary.Add(nameof(chgDtlVoMian), chgDtlVoMian);
                    dictionary.Add(nameof(OdExecPatientVo), UserInfo);
                    DicCircpVo dicCircp = GeneralPrint.GetInstance.GetPrintDicCirpsBySfName(SubFuncName.HERBALMEDICINE_PRINT)?.Count > 0 ? GeneralPrint.GetInstance.GetPrintDicCirpsBySfName(SubFuncName.HERBALMEDICINE_PRINT).First() : new DicCircpVo();
                    if (dicCircp != null)
                    {
                        string reportPath = TemplateDownloader.GetCircpTemplatePath(dicCircp.DcrId);
                        MzReport.ReportEntity reportControl = new MzReport.ReportEntity();
                        if (reportControl == null)
                        {
                            reportControl = new MzReport.ReportEntity();
                        }
                        reportControl.Preview(reportPath, dicCircp.DcrId, dictionary, null, reportsView);
                    }
                }
            }
  • 相关阅读:
    图论4-floyd
    。。。
    [LOJ10164]数字游戏
    KMP模板
    无向图割点模板
    tarjan有向图模板
    LCA倍增模板
    P2149 [SDOI2009]Elaxia的路线
    树的直径dp模板
    [暑假集训]Day4 T3 平板涂色
  • 原文地址:https://www.cnblogs.com/yuanshuo/p/13878389.html
Copyright © 2020-2023  润新知