Example #1
0
        private void copyTopLevelRollup_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SalesOrder    salesOrder    = (SalesOrder)m_order.GetContract <SalesOrder>();
            PurchaseOrder purchaseOrder = (PurchaseOrder)m_order.GetContract <PurchaseOrder>();

            if (salesOrder == null | purchaseOrder == null)
            {
                MessageBox.Show("This order does not contain a sales order and a purchase order",
                                Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            salesOrder.RollupLineItemsFromPurchaseOrder(purchaseOrder);
        }