zoukankan      html  css  js  c++  java
  • 项目实例:车辆信息统计报表管理系统WinForm、Web打印设计

      WinForm、Web打印设计,主要是设计的方法,详细代码自己实现了

        private void ReportGIS_Load(object sender, EventArgs e)

        {

         Document doc = new Document(DocumentId, wd, this);

         show();//show后才调用btnPrint_Click

        }

     

        public Document(int pDocumentId, WidgetDrive pWidgetDrive, System.Windows.Forms.Form pForm)

        {

          GridHelper.OnPrint += new EventHandler(btnPrint_Click);

        }

        private void btnPrint_Click(object sender, EventArgs e)

        {

         Print();

        }

        public void Print()

        {

         string html = RenderHtml(true);

         //...

         //...

         wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(PrintDocument);//打印

        }

     

        private string RenderHtml(bool pShowCommand)  

        {

        //Table tb = SetPageLayout(pShowCommand);

        }

     

        private Table SetPageLayout(bool pShowCommand)

        {

        //动态生成打印布局

        //每个器件的宽度,高度,框架,打印、导出按钮是否显示

        //标题的翻译

        if(wb.WebControl is GridView)

        {

        // 根据器件的的类型给相应的宽度

        }

     

        RowAddCell(row, ctrlCol, wb.WebControl, pShowCommand);

        //开始加备注

        }

     

        private void RowAddCell(TableRow pTableRow, int pColumnSpan, System.Web.UI.Control pWebControl, bool pShowCommand)

        {

         if (wc.AccessKey == "X")//左上角标识

         {

         //第一次循环加左上角

         //加蓝色滚动条

          }

        }

     

  • 相关阅读:
    原创 C++应用程序在Windows下的编译、链接(四)动态链接
    IE浏览器 json异常
    Linux系统github使用
    Mysql in 排序
    转 php四种基础算法:冒泡,选择,插入和快速排序法
    转 mysql取今天,明天,工作日,周末,本周,下周,下月数据
    下载远程图片到本地
    转 PHP中SQL_CALC_FOUND_ROWS与FOUND_ROWS()和count()
    星级点评
    21个值得收藏的Javascript技巧
  • 原文地址:https://www.cnblogs.com/Gemgin/p/3136343.html
Copyright © 2011-2022 走看看