Ejemplo n.º 1
0
        private void MaybePrintLabel(bool printLabels, int consignmentId, WandLog wandLog, int userNumber)
        {
            if (!printLabels || !wandLog.ContainerNo.HasValue || wandLog.TransType != "W")
            {
                return;
            }

            var consignment = this.consignmentRepository.FindById(consignmentId);

            var labelMessage = string.Empty;
            var labelData    = $"\"{this.GetPrintAddress(consignment.Address)}\", \"{this.GetLabelInformation(wandLog)}\"";
            var printerName  = this.GetPrinter(userNumber);

            if (consignment.Address.CountryCode != "GB")
            {
                this.bartenderLabelPack.PrintLabels(
                    $"Address{wandLog.Id}",
                    printerName,
                    1,
                    "dispatchaddress.btw",
                    labelData,
                    ref labelMessage);
            }
        }
Ejemplo n.º 2
0
 private string GetLabelInformation(WandLog wandLog)
 {
     return
         ($"Carton: {wandLog.ContainerNo}{Environment.NewLine}Article:{wandLog.ArticleNumber}{Environment.NewLine}Serial No: {wandLog.SeriaNumber1} {wandLog.SeriaNumber2}{Environment.NewLine}Order: {wandLog.OrderNumber}{Environment.NewLine}Consignment: {wandLog.ConsignmentId}");
 }