예제 #1
0
        protected void PrintJobViewItemLabel(IPrinterInfo printerInfo, EditPrdnJobViewModel viewJob, ProductionJob job = null)
        {
            if ((viewJob.PrdnTypeCode == null) && (job.IfNotNull(j => j.Run) != null))
            {
                viewJob.loadFromRun(job.Run);
            }
            if ((viewJob.WorksheetID != null) && (viewJob.EditWorksheet == null))
            {
                WorksheetEditViewModel.LoadViewJobEditWorksheet(viewJob, job);
            }

            PrdnZplMultiParam parm = new PrdnZplMultiParam(viewJob);
            ZplPrinterHelper.NetworkMultiZpl(printerInfo.PrinterHostName, (int)printerInfo.PrinterPort, parm);
        }
예제 #2
0
        protected void PrintItemViewLabel(IPrinterInfo printerInfo, InvItemViewModel item, ProductionJob job = null)
        {
            PrdnZplMultiParam parm = new PrdnZplMultiParam(item);

            if (job != null)
            {
                parm.Priority = job.IfNotNull(j => j.Priority).IfNotNull(p => p.Name);

                parm.SetPrdnOrderDisp(
                    job.IfNotNull(j => j.Run).IfNotNull(r => r.PrdnOrderNo),
                    job.IfNotNull(j => j.Run).IfNotNull(r => r.PrdnType.IfNotNull(t => t.Code)),
                    job.IfNotNull(j => j.RunSeqNo));

                parm.ShipCD = job.IfNotNull(j => j.ShipMethodCD);
            }

            ZplPrinterHelper.NetworkMultiZpl(printerInfo.PrinterHostName, (int)printerInfo.PrinterPort, parm);
        }