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")); }
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); }
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")); }