示例#1
0
        private void PrintOrderLines(Ticket ticket, IEnumerable <Order> lines, PrinterMap p)
        {
            Debug.Assert(lines != null, "lines != null");
            var lns = lines.ToList();

            if (lns.Count() == 0)
            {
                return;
            }
            if (p == null)
            {
                //todo: globalize
                MessageBox.Show("Yazdırma sırasında bir problem tespit edildi: Yazıcı Haritası null");
                AppServices.Log("Yazıcı Haritası NULL problemi tespit edildi.");
                return;
            }
            var printer        = PrinterById(p.PrinterId);
            var prinerTemplate = PrinterTemplateById(p.PrinterTemplateId);

            if (printer == null || string.IsNullOrEmpty(printer.ShareName) || prinerTemplate == null)
            {
                return;
            }
            var ticketLines = TicketFormatter.GetFormattedTicket(ticket, lns, prinerTemplate);

            PrintJobFactory.CreatePrintJob(printer).DoPrint(ticketLines);
        }
示例#2
0
 public PrinterService(ISettingService settingService, ICacheService cacheService, IExpressionService expressionService, ILogService logService,
                       TicketFormatter ticketFormatter, FunctionRegistry functionRegistry)
 {
     _cacheService     = cacheService;
     _logService       = logService;
     _ticketFormatter  = ticketFormatter;
     _functionRegistry = functionRegistry;
     _functionRegistry.RegisterFunctions();
 }
 public TicketPrintTaskBuilder(ILogService logService, ICacheService cacheService, TicketFormatter ticketFormatter)
 {
     _logService = logService;
     _cacheService = cacheService;
     _ticketFormatter = ticketFormatter;
 }
 public TicketPrintTaskBuilder(ILogService logService, ICacheService cacheService, TicketFormatter ticketFormatter)
 {
     _logService      = logService;
     _cacheService    = cacheService;
     _ticketFormatter = ticketFormatter;
 }