public override void AddSellingItemToSelectedSellingItems()
        {
            PricedDescribedSoldableItem selectedSellingItem = mAvailableItemsToPurchaseControl.GetSelectedSellingItem();

            mSelectedSellingItemsControl.AddSellingItem(selectedSellingItem);

            decimal totalPrice = mSelectedSellingItemsControl.GetTotalSellingItemPrice();

            mTaxControl.ComputeTaxes(totalPrice);
        }
        public override void Initialise()
        {
            mAvailableItemsToPurchaseControl.ResetControl();

            PricedDescribedSoldableItem item1 = new PricedDescribedSoldableItem("shoes", 35.78m);
            PricedDescribedSoldableItem item2 = new PricedDescribedSoldableItem("hats", 50.99m);
            PricedDescribedSoldableItem item3 = new PricedDescribedSoldableItem("glasses", 12.99m);

            mAvailableItemsToPurchaseControl.AddSellingItem(item1);
            mAvailableItemsToPurchaseControl.AddSellingItem(item2);
            mAvailableItemsToPurchaseControl.AddSellingItem(item3);
        }
Пример #3
0
        public void AddSellingItem(PricedDescribedSoldableItem sellingItem)
        {
            if (sellingItem != null)
            {
                QuatifiedPricedDescribedSoldableItem quatifiedPricedDescribedSoldableItem = null;

                int selectedItemPosition = GetSelectedItemPosition(sellingItem);

                if (selectedItemPosition >= 0)
                {
                    quatifiedPricedDescribedSoldableItem = mSellingItems[selectedItemPosition];
                    quatifiedPricedDescribedSoldableItem.IncrementQuantity();
                }
                else
                {
                    quatifiedPricedDescribedSoldableItem = new QuatifiedPricedDescribedSoldableItem(sellingItem, 1);
                    mSellingItems.Add(quatifiedPricedDescribedSoldableItem);
                }

                UpdateSellingItemDescription(quatifiedPricedDescribedSoldableItem);
            }
        }
        public override void AddSellingItem(PricedDescribedSoldableItem pricedDescribedSoldableItem)
        {
            base.AddSellingItem(pricedDescribedSoldableItem);

            mComboBox.Items.Add(pricedDescribedSoldableItem.GetShortDescription());
        }
Пример #5
0
 public virtual void AddSellingItem(PricedDescribedSoldableItem pricedDescribedSoldableItem)
 {
     mSellingItems.Add(pricedDescribedSoldableItem);
 }