Beispiel #1
0
        static void Main(string[] args)
        {
            Invoice ostoskori = new Invoice();

            ostoskori.Customer = "Pertti Keinonen";
            InvoiceItem ostos = new InvoiceItem {
                Name = "Eggs", Price = 1.40, Quantity = 2, Total = 1
            };
            InvoiceItem ostos2 = new InvoiceItem {
                Name = "Bread", Price = 2.19, Quantity = 3, Total = 1
            };
            InvoiceItem ostos3 = new InvoiceItem {
                Name = "Juice", Price = 1.79, Quantity = 1, Total = 1
            };

            ostoskori.AddItem(ostos);
            ostoskori.AddItem(ostos2);
            ostoskori.AddItem(ostos3);
            ostoskori.PrintInvoice();


            Console.ReadKey();
        }
Beispiel #2
0
 public void AddItem(InvoiceItem ini)
 {
     invoice.Add(ini);
 }