private void tool_print_Click(object sender, EventArgs e) { if (this._fpxx.GetSpxxs().Count == 0) { MessageManager.ShowMsgBox("INP-242120"); } else { try { FPPrint print1 = new FPPrint(Invoice.FPLX2Str(this._fpxx.Fplx), this.fpxx.fpdm, int.Parse(this.fpxx.fphm)); print1.Print(true); string str = print1.IsPrint; if ((str != "0000") && (str != "0005")) { MessageManager.ShowMsgBox("INP-242116"); } } catch (Exception exception) { this.log.Error("发票打印异常:" + exception.Message); MessageManager.ShowMsgBox("INP-242116"); } } }
private void XHQDDaYin(string fpzl, string fpdm, int fphm) { string str = ""; try { IPrint print = FPPrint.Create(fpzl, fpdm, fphm, false); print.Print(true); if (print.IsPrint == "0000") { str = "成功"; } else if (print.IsPrint != "0005") { str = "取消"; } } catch (Exception exception) { this.loger.Error("销货清单打印异常:" + exception.Message); str = "不成功"; } if (!string.IsNullOrEmpty(str)) { string[] textArray1 = new string[] { fphm.ToString("00000000"), str }; MessageManager.ShowMsgBox("INP-442222", "提示", textArray1); } }
internal override BaseResult DoService() { IPrint print = FPPrint.Create(_args.FPZL, _args.FPDM, _args.FPHM, true); print.Print(); PrinterEventArgs printeventargs = new PrinterEventArgs() { Left = -10, Top = 0, IsQuanDa = true, PageLenght = 0, PrinterName = _args.Printer }; print.printSetUp_0.printer_0.SaveUserPrinterEdge(printeventargs); PrintSetUp.pageSetupDialog.Document.PrinterSettings = new PrinterSettings(); PrintSetUp.pageSetupDialog.Document.PrinterSettings.PrinterName = _args.Printer; print.printSetUp_0.CurrentPrinterName = _args.Printer; PrintSetUp.pageSetupDialog.Document.PrinterSettings.DefaultPageSettings.PaperSize = print.printSetUp_0.paperSize_0; //byte[] imgbyte = print.DaYinMethod(print.printSetUp_0, new PrintSetEventArgs(), false); ; byte[] imgbyte1 = print.PreviewMethod(); return(new DaYinResult(_args, Convert.ToBase64String(imgbyte1))); }