示例#1
0
        public ActionResult PrintBarcode(int id)
        {
            var barcode = _repositoryFactory.BarcodeRepository.GetNullableById(id);

            if (barcode == null)
            {
                Message = "There was an error loading the selected barcode.";
                return(RedirectToAction("Index"));
            }

            _barcodeService.Print(barcode.Id, barcode.PlateName);

            Message = "Label has been sent to the printer";
            return(RedirectToAction("Details", new { id = barcode.UserJobPlate.UserJob.Id }));
        }
示例#2
0
 public ActionResult Print(int id, string name)
 {
     _barcodeService.Print(id, name);
     return(View());
 }