public ItemOverrideMenu(ItemDisplayBox itemToModify, Transaction transaction, ClosePriceOverrideMenu closeFunction)
        {
            InitializeComponent();

            m_itemBox = itemToModify;
            m_transaction = transaction;
            m_closeFunction = closeFunction;

            OriginalPriceField.Text = "Original Price: " + m_itemBox.SourceItem.OriginalPrice.ToString( "C" );
        }
        public ItemEditMenu(ItemDisplayBox itemToModify, Transaction transaction, CloseEditMenu closeFunction, Employee currentUser)
        {
            InitializeComponent();

            m_itemBox = itemToModify;
            m_transaction = transaction;
            m_closeFunction = closeFunction;
            m_currentUser = currentUser;
            ItemNameBox.Text = m_itemBox.SourceItem.ItemName.ToString();

            RemoveItem = false;
            PriceOverride = false;
        }
        public ItemAndDiscountOutputObject(Item newItem, Transaction transaction, double heightOfEachBox, StackPanel itemOutputPanel, StackPanel couponOutputPanel, UpdateTotals updateFunction, Employee currentUser)
        {
            m_item = newItem;
            m_transaction = transaction;
            boxHeight = heightOfEachBox;
            m_itemOutputPanel = itemOutputPanel;
            m_discountOutputPanel = couponOutputPanel;
            m_currentUser = currentUser;

            m_stackOfDiscounts = new StackPanel();

            m_updateFunction = updateFunction;

            ItemDisplayBox itemDisplayBox = new ItemDisplayBox(m_item, m_transaction, RemoveItem, UpdateItemDetails, AddDiscount, m_currentUser);
            itemDisplayBox.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            itemDisplayBox.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            itemDisplayBox.Height = boxHeight;

            m_itemDescriptionBox = new Grid();
            m_itemDescriptionBox.Children.Add(itemDisplayBox);

            if (m_item.Discounts.Count() == 0)
            {
                Grid blankCoupon = new Grid();
                blankCoupon.Height = boxHeight;
                m_stackOfDiscounts.Children.Add(blankCoupon);
                m_noDiscounts = true;
            }
            else
            {
                m_noDiscounts = false;
                foreach (IDiscount discount in m_item.Discounts)
                {
                    DiscountDisplayBox autoAppliedDiscount = new DiscountDisplayBox(discount, m_item, m_transaction, RemoveDiscount, UpdateItemDetails, m_currentUser);
                    autoAppliedDiscount.Height = boxHeight;
                    m_stackOfDiscounts.Children.Add(autoAppliedDiscount);
                }
            }
            UpdateHeight();
            OutputItem();
        }