Example #1
0
        public void PrintLabel()
        {
            var document = Document as TachographDocument;

            if (Document != null && document != null)
            {
                LabelHelper.Print(document);
            }
        }
        private void PrintLabel(TachographDocument tachographDocument)
        {
            if (ReprintMode != ReprintMode.Label)
            {
                return;
            }

            LabelHelper.Print(tachographDocument);
        }
Example #3
0
        private void OnGenerateM1N1(Grid root)
        {
            if (!IsValid(root))
            {
                ShowError(Properties.Resources.EXC_MISSING_FIELDS);
                return;
            }

            LabelHelper.Print(M1N1Document);
            ShowMessage(Properties.Resources.TXT_LABEL_ADDED_TO_QUEUE, Properties.Resources.TXT_PRINT);
        }
        private void PrintLabel(TachographDocument document, bool userInitiated)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }

            if (string.IsNullOrEmpty(document.DocumentType))
            {
                if (userInitiated)
                {
                    ShowError(Resources.TXT_ERR_MUST_SELECT_DOCUMENT_TYPE);
                }
                return;
            }

            if (document.CalibrationTime == null)
            {
                document.CalibrationTime = DateTime.Now;
            }

            LabelHelper.Print(document);
        }