示例#1
0
        public DocumentsPrinterDlg(
            IUnitOfWork uow,
            RouteList routeList,
            IEntityDocumentsPrinterFactory entityDocumentsPrinterFactory,
            RouteListPrintableDocuments selectedType)
        {
            Build();
            TabName = "Печать документов МЛ";
            _entityDocumentsPrinter =
                (entityDocumentsPrinterFactory ?? throw new ArgumentNullException(nameof(entityDocumentsPrinterFactory)))
                .CreateRouteListWithOrderDocumentsPrinter(uow, routeList, new[] { selectedType });

            _currentRouteList = routeList;

            Configure();
        }
示例#2
0
        public DocumentsPrinterDlg(Order order, IEntityDocumentsPrinterFactory entityDocumentsPrinterFactory)
        {
            Build();

            TabName = "Печать документов заказа";

            _entityDocumentsPrinter =
                (entityDocumentsPrinterFactory ?? throw new ArgumentNullException(nameof(entityDocumentsPrinterFactory)))
                .CreateOrderDocumentsPrinter(order);

            if (!string.IsNullOrEmpty(_entityDocumentsPrinter.ODTTemplateNotFoundMessages))
            {
                MessageDialogHelper.RunWarningDialog(_entityDocumentsPrinter.ODTTemplateNotFoundMessages);
            }

            _currentOrder = order;

            Configure();
        }