コード例 #1
0
        public async Task <IActionResult> PrintInStoreCatering(int id)
        {
            var lunch = await _lunchRepository.GetLunchByIdAsync(id);

            var lunchVm = _mapper.Map <Lunch, LunchTicketViewModel>(lunch);

            lunchVm.InStore = true;
            var view   = "TicketCatering";
            var result = await this.RenderViewAsync(view, lunchVm, true);

            _printer.AddToQueue(result);
            return(Ok());
        }
コード例 #2
0
        public async Task QuickDiscount(decimal value)
        {
            var disc = _discountRepository.AddQuickDiscount(value);

            var view   = "VoucherPrint";
            var result = await this.RenderViewAsync(view, disc, true);

            _printerRepository.AddToQueue(result);
        }
コード例 #3
0
        public async Task <IActionResult> PrintOnlineOrder(int id)
        {
            Order order = await _orderRepository.GetOrderByIdAsync(id);

            var view   = "OrderPrint";
            var result = await this.RenderViewAsync(view, order, true);

            _printer.AddToQueue(result);
            return(Ok());
        }