Beispiel #1
0
 public static ReturnMsg<string> Print(PrintData data)
 {
     string template = System.IO.Path.Combine(SettingConfig.TemplatePath, data.template);
     if (!File.Exists(template))
     {
         Downloader.DownLoadTemplate(new string[] { data.template });
     }
     IGenPrinter printer = new GenPrinter();
     ReportGenConfig printerConfig = new ReportGenConfig()
     {
         NumberOfCopies = SettingConfig.Copy,
         Printer = SettingConfig.PrinterName,
         PrinterType = SettingConfig.PrinterType,
         Template = template
     };
     return printer.Print(data.dataset, printerConfig);
 }
 private void DoDnPackPrint(PrintData data)
 {
     if (data.result)
     {
         ReturnMsg<string> msg = Printer.Print(data);
         new MsgBox(msg.level, msg.content).ShowDialog();
     }
     else
     {
         new MsgBox(MsgLevel.Mistake, data.content).ShowDialog();
     }
 }