public PrintResult Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == DisplayName) { docs.Add(new CatalogOfferDocument(ViewHeader, GetPrintableOffers())); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == DisplayName) { Coroutine.BeginExecute(PrintPreview().GetEnumerator()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == DisplayName) { docs.Add(new ShelfLifeDocument(Items.Value.ToArray(), GetVisibilityDic())); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == DisplayName) { Coroutine.BeginExecute(Print().GetEnumerator()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == DisplayName) { docs.Add(new CheckDocument(Items.Value.ToArray())); } if ((string)item.Header == "Акт возврата") { docs.Add(new ReturnActDocument(Items.Value.Where(x => x.CheckType == CheckType.CheckReturn).ToArray())); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == DisplayName) { Coroutine.BeginExecute(PrintChecks().GetEnumerator()); } if (LastOperation == "Акт возврата") { Coroutine.BeginExecute(PrintReturnAct().GetEnumerator()); } return(null); }
public PrintResult Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == DisplayName) { //порядок сортировки должен быть такой же как в таблице var lines = GetItemsFromView <IOrderLine>("Lines") ?? Lines.Value; docs.Add(new OrderDocument(Order.Value, lines)); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == DisplayName) { Coroutine.BeginExecute(PrintPreview().GetEnumerator()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == "Списание") { docs.Add(new WriteoffDocument(Lines.ToArray())); } if ((string)item.Header == "Акт списания") { docs.Add(new WriteoffActDocument(Lines.ToArray())); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == "Списание") { Coroutine.BeginExecute(Print().GetEnumerator()); } if (LastOperation == "Акт списания") { Coroutine.BeginExecute(PrintAct().GetEnumerator()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == "Возврат товара") { docs.Add(new ReturnToSuppliersDetailsDocument(Lines.ToArray(), Doc, Session.Query <WaybillSettings>().First())); } if ((string)item.Header == "Возврат ярлык") { docs.Add(new ReturnLabel(Doc, Session.Query <WaybillSettings>().First())); } if ((string)item.Header == "Возврат счет-фактура") { docs.Add(new ReturnInvoice(Doc, Session.Query <WaybillSettings>().First())); } if ((string)item.Header == "Возврат товарная накладная") { docs.Add(new ReturnWaybill(Doc, Session.Query <WaybillSettings>().First(), Session.Query <User>().First())); } if ((string)item.Header == "Акт о расхождении") { docs.Add(new ReturnDivergenceAct(Doc, Session.Query <WaybillSettings>().First())); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == "Возврат товара") { Coroutine.BeginExecute(Print().GetEnumerator()); } if (LastOperation == "Возврат ярлык") { Coroutine.BeginExecute(PrintReturnLabel().GetEnumerator()); } if (LastOperation == "Возврат счет-фактура") { Coroutine.BeginExecute(PrintReturnInvoice().GetEnumerator()); } if (LastOperation == "Возврат товарная накладная") { Coroutine.BeginExecute(PrintReturnWaybill().GetEnumerator()); } if (LastOperation == "Акт о расхождении") { Coroutine.BeginExecute(PrintReturnDivergenceAct().GetEnumerator()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == "Товарные запасы") { docs.Add(new StockDocument(Items.Value.ToArray())); } if ((string)item.Header == "Ярлыки") { Tags(); } if ((string)item.Header == "Товары со сроком годности") { var stocks = Items.Value.Where(s => !String.IsNullOrEmpty(s.Period)).ToList(); var per = new DialogResult(new SelectStockPeriod(stocks, Name)); per.Execute(null); } if ((string)item.Header == "Товары со сроком годности менее 1 месяца") { docs.Add(new StockLimitMonthDocument(Items.Value.Where(s => s.Exp < DateTime.Today.AddMonths(1)).ToArray(), "Товары со сроком годности менее 1 месяца", Name)); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (string.IsNullOrEmpty(LastOperation) || LastOperation == "Товарные запасы") { Coroutine.BeginExecute(Print().GetEnumerator()); } if (LastOperation == "Ярлыки") { Tags(); } if (LastOperation == "Товары со сроком годности") { Coroutine.BeginExecute(PrintStockLimit().GetEnumerator()); } if (LastOperation == "Товары со сроком годности менее 1 месяца") { Coroutine.BeginExecute(PrintStockLimitMonth().GetEnumerator()); } return(null); }
public PrintResult Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == DisplayName) { if (!User.CanPrint <Awaited, AwaitedItem>() || Address == null) { continue; } var items = GetItemsFromView <AwaitedItem>("Items") ?? Items.Value; docs.Add(new AwaitedDocument(items)); } if ((string)item.Header == "Сводный прайс-лист") { if (!User.CanPrint <Awaited, Offer>() || CurrentCatalog.Value == null) { continue; } var items = GetPrintableOffers(); docs.Add(new CatalogOfferDocument(CurrentCatalog.Value.Name.Name, items)); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == DisplayName) { Coroutine.BeginExecute(PrintPreview().GetEnumerator()); } if (LastOperation == "Сводный прайс-лист") { Coroutine.BeginExecute(PrintPreviewCatalogOffer().GetEnumerator()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == "Ценники") { PrintFixedDoc(new PriceTagDocument(PrintableLines(), priceTagSettings, priceTag).Build().DocumentPaginator, "Ценники"); } if ((string)item.Header == "Постеллажная карта") { PrintFixedDoc(new RackingMapDocument(PrintableLines(), Settings, rackingMap).Build().DocumentPaginator, "Постеллажная карта"); } if ((string)item.Header == "Штрихкоды") { PrintFixedDoc(new BarcodeDocument(PrintableLines(), Settings).Build().DocumentPaginator, "Штрихкоды"); } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (string.IsNullOrEmpty(LastOperation) || LastOperation == "Ценники") { PrintPriceTags().Execute(new ActionExecutionContext()); } if (LastOperation == "Постеллажная карта") { PrintRackingMaps().Execute(new ActionExecutionContext()); } if (LastOperation == "Штрихкоды") { PrintBarcode().Execute(new ActionExecutionContext()); } return(null); }
PrintResult IPrintable.Print() { var docs = new List <BaseDocument>(); if (!IsView) { var printItems = PrintMenuItems.Where(i => i.IsChecked).ToList(); if (!printItems.Any()) { printItems.Add(PrintMenuItems.First()); } foreach (var item in printItems) { if ((string)item.Header == "Печать документов") { docs.Add(new DisplacementDocument(Lines.ToArray())); } if ((string)item.Header == "Ярлыки") { Tags(); } if ((string)item.Header == "Требование-накладная") { var req = new RequirementWaybill(); var reqDialog = new DialogResult(req); reqDialog.Execute(null); if (req.requirementWaybillName != null) { docs.Add(new DisplacementWDocument(Doc, Lines, Session.Query <WaybillSettings>().First(), req.requirementWaybillName)); } } if ((string)item.Header == "Внутреннее-перемещение") { docs.Add(new DisplacementDocumentWaybill(Doc, Lines, Session.Query <WaybillSettings>().First())); } if ((string)item.Header == "Протокол согласования цен ЖНВЛП") { var req = new RequirementNegotiationProtocol(); var reqDialog = new DialogResult(req); reqDialog.Execute(null); if (req.Fio != null) { docs.Add(new PriceNegotiationProtocol(Doc, Lines, req.Fio)); } } } return(new PrintResult(DisplayName, docs, PrinterName)); } if (String.IsNullOrEmpty(LastOperation) || LastOperation == "Печать документов") { Coroutine.BeginExecute(Print().GetEnumerator()); } if (LastOperation == "Ярлыки") { Tags(); } if (LastOperation == "Требование-накладная") { Coroutine.BeginExecute(PrintDisplacementWaybill().GetEnumerator()); } if (LastOperation == "Внутреннее-перемещение") { Coroutine.BeginExecute(PrintDisplacementDocumentWaybill().GetEnumerator()); } if (LastOperation == "Протокол согласования цен ЖНВЛП") { Coroutine.BeginExecute(PrintPriceNegotiationProtocol().GetEnumerator()); } return(null); }