public int JPNPrintTicket(string docid, string retailer, string tourist, string goods, string adsinfo) { setClearParseMap(); int nRet = 0; try { if (!ParseParam(docid, retailer, tourist, goods, adsinfo)) { nRet = -1; return(nRet); } // 수출면세물품구입기록표 UserPrintDocument printDocObj = new UserPrintDocument(); printDocObj.UserPrintPageEvent += new UserPrintDocument.UserPrintPageEventHandler(eventPrintDoc01); printDocObj.Print(); if (Convert.ToInt32(MapDocid[DocID.PublichType]) == SlipType02) { // 면세물품구매자확약서 printDocObj = new UserPrintDocument(); printDocObj.UserPrintPageEvent += new UserPrintDocument.UserPrintPageEventHandler(eventPrintDoc02); printDocObj.Print(); } // 구입자 보관용 printDocObj = new UserPrintDocument(); printDocObj.UserPrintPageEvent += new UserPrintDocument.UserPrintPageEventHandler(eventPrintDoc03); printDocObj.Print(); } catch (Exception e) { MessageBox.Show(this, e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); nRet = -1; } return(nRet); }
public int JPNPrintTicket(string docid, string retailer, string tourist, string adsinfo, string signinfo = null) { m_docid = docid; m_retailer = retailer; m_tourist = tourist; m_adsinfo = adsinfo; m_sign = signinfo; setClearParseMap(); int nRet = 0; try { if (!ParseParam(docid, retailer, tourist, adsinfo)) { nRet = -1; return(nRet); } List <int> PublishTypeList = (List <int>)MapDocid[DocID.PublishType]; foreach (int Type in PublishTypeList) { SlipType = Type; UserPrintDocument printDocObj = new UserPrintDocument(); printDocObj.UserPrintPageEvent += new UserPrintDocument.UserPrintPageEventHandler(eventPrintDocNG); if (printer_name != null && !string.Empty.Equals(printer_name.Trim())) { printDocObj.PrinterSettings.PrinterName = printer_name; } printDocObj.Print(); } } catch (Exception e) { MessageBox.Show(null, e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); nRet = -1; } return(nRet); }
public int JPNPrintSummaryTicket(string total_slip_seq, string total_sum_amt, string total_tax_amt, string total_fee_amt, string total_refund_amt) { int retVal = 0; MapSummeryInfo.Add(SummaryInfo.SEQ, total_slip_seq); MapSummeryInfo.Add(SummaryInfo.SUM_AMT, total_sum_amt); MapSummeryInfo.Add(SummaryInfo.TAX_AMT, total_tax_amt); MapSummeryInfo.Add(SummaryInfo.FEE_AMT, total_fee_amt); MapSummeryInfo.Add(SummaryInfo.REFUND_AMT, total_refund_amt); UserPrintDocument printDocObj = new UserPrintDocument(); if (printer_name != null && !string.Empty.Equals(printer_name.Trim())) { printDocObj.PrinterSettings.PrinterName = printer_name; } printDocObj.UserPrintPageEvent += new UserPrintDocument.UserPrintPageEventHandler(eventPrintSummary); printDocObj.Print(); return(retVal); }