Exemple #1
0
        static void Main(string[] args)
        {
            Order SaleOrder = new Order();


            ItemwithGroupPrice ItemObject = new ItemwithGroupPrice();

            Console.WriteLine("Enter the SKU Group:");
            string SKUgroup = Console.ReadLine();


            Console.WriteLine("Enter the price:");
            double pricetosend = Convert.ToDouble(Console.ReadLine());



            ItemObject = SaleOrder.ProcessOrder(SKUgroup, pricetosend);

            Console.WriteLine("Item SKU :");
            foreach (var item in ItemObject.SKU)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine("Group price for the Item :");
            Console.WriteLine(ItemObject.groupPrice);
        }
Exemple #2
0
            //Method to take GroupOrder and price .
            //it will return object with list of SKU and groupPrice;
            public ItemwithGroupPrice ProcessOrder(string Order, double Price)
            {
                ItemwithGroupPrice Itemobj = new ItemwithGroupPrice();

                getUnitCost(Order);
                CalculateTotalUnitCost();
                getPercentageUnitCost();
                CalculateSOPrice(Price);

                Itemobj.groupPrice = getGroupPrice();
                foreach (var sku in SKUItem)
                {
                    Itemobj.SKU.Add(sku);
                }

                return(Itemobj);
            }