zoukankan      html  css  js  c++  java
  • 显示单据信息(类似打印)

    展示效果

    代码

    /// <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);
                    }
                }
            }
  • 相关阅读:
    九个合理的个人所得税避税方案
    百度搜索技巧
    jsoup方法string转document
    java正则
    多线程之join方法
    java获取当前日期时间代码总结
    Error与Exception的区别,Java常见异常Execption总结
    Google Chrome调试js入门
    Resource temporarily unavailable用户的连接数设置的太小
    所有javax包
  • 原文地址:https://www.cnblogs.com/yuanshuo/p/13878389.html
Copyright © 2011-2022 走看看