public DocumentActionWindow(B10DeskHelper pB10DH, DocumentAction pDocAction) { InitializeComponent(); B10DH = pB10DH; DocAction = pDocAction; PurchaseInvoiceLineTab.Visibility = Visibility.Hidden; CreatePurchaseInvoiceTab.Visibility = Visibility.Hidden; GetPurchaseInvoiceDueDateTab.Visibility = Visibility.Hidden; PostPurchaseInvoiceTab.Visibility = Visibility.Hidden; switch (DocAction.Action) { case EDocumentAction.get_purchase_invoice_lines: FillPurchaseInvoiceLineTab(); break; case EDocumentAction.create_purchase_invoice: FillCreatePurchaseInvoiceTab(); break; case EDocumentAction.post_block_purchase_invoice: FillPostPurchaseInvoiceTab(); break; case EDocumentAction.get_payment_due_date: FillGetPurchaseInvoiceDueDateTab(); break; case EDocumentAction.unblock_purchase_invoice_for_payment: case EDocumentAction.block_purchase_invoice_for_payment: FillUnblockInvoiceTab(); break; } }
public PurchaseOrderWindow(B10DeskHelper pB10DH, PurchaseOrder pPurchaseOrder, List <VendorWpf> pVendors, List <Article> pArticles, List <Warehouse> pWarehouses, List <GLAccount> pGLAccounts, List <VatCode> pVatCodes, List <Project> pProjects, List <CostCenter> pCostCenters, List <CostUnit> pCostUnits) { InitializeComponent(); B10DH = pB10DH; PO = pPurchaseOrder; if (PO.OrderLines == null) { PO.OrderLines = new List <PurchaseOrderLine>(); } Vendors = pVendors; Articles = pArticles; Warehouses = pWarehouses; GLAccounts = pGLAccounts; VatCodes = pVatCodes; Projects = pProjects; CostCenters = pCostCenters; CostUnits = pCostUnits; this.DataContext = PO; FillPurchaseOrderLineTab(); }