コード例 #1
0
        private void ExecutePrintCommand(Reestr reestr)
        {
            var printViewType   = (PrintViewType)Enum.Parse(typeof(PrintViewType), SelectedPrintViewType.ToString());
            var printInitialize = PrintPreviewFactory.GetPrintView(printViewType);

            var flowDoc = printInitialize.InitializeFlow(new Models.ViewModels.ReestrObject(reestr));

            PrintHelper.Prints(flowDoc, reestr.PackingDate.ToString("dd.MM.yyyy"));
        }
コード例 #2
0
        private void ExecutePrintCommand(Customer customer)
        {
            var printInitialize = PrintPreviewFactory.GetPrintView(PrintViewType.BuyerInformation);
            var flowDoc         = printInitialize.InitializeFlow(new Models.ViewModels.ReestrObject(new Reestr()
            {
                Customer = customer
            }));

            PrintHelper.Prints(flowDoc, customer.ShortName);
        }
コード例 #3
0
        private void ExecutePrintViewCommand(ReestrObject reestr)
        {
            var printViewType = (PrintViewType)Enum.Parse(typeof(PrintViewType), SelectedPrintViewType.ToString());

            if (printViewType == PrintViewType.NoPrint)
            {
                return;
            }
            var printInitialize = PrintPreviewFactory.GetPrintView(printViewType);

            FlowDocument flowDoc = printInitialize.InitializeFlow(reestr);

            PrintHelper.Prints(flowDoc, reestr.PackingDate.ToString("dd.MM.yyyy"));
        }