Example #1
0
        static void Main(string[] args)
        {
            Food food = new Food()
            {
                Name = "apples", Brand = "BrandA", ExpirationDate = DateTime.Parse("28.06.21"), Price = 1.50m
            };

            Beverage milk = new Beverage()
            {
                Name = "milk", Brand = "BrandM", Price = 0.99m, ExpirationDate = DateTime.Parse("02.03.22")
            };

            Clothes shirt = new Clothes()
            {
                Name = "T-shirt", Brand = "BransT", Color = "violet", Size = ClothesSize.M, Price = 15.99m
            };

            Appliance laptop = new Appliance()
            {
                Name = "laptop", Brand = "BrandL", Price = 2345m, Model = "ModelL", ProductionDate = DateTime.Parse("03-03-20"), Weight = 1.125
            };

            Cart cart = new Cart();

            cart.AddProduct(food, 2.45m);
            cart.AddProduct(milk, 3);
            cart.AddProduct(shirt, 2);
            cart.AddProduct(laptop, 1);

            var date = cart.PurchaseDateTime();

            Cashier cashier = new Cashier();

            cashier.PrintReceipt(cart.GetAllProducts, date);
        }
Example #2
0
 //Вывести на интерфейс имнформацию о продавце
 public void printCashiers(Cashier cashier, TextBox FIO, TextBox BoxNumber)
 {
     //.Find
     FIO.Text       = cashier.FullName;
     BoxNumber.Text = cashier.BoxNumber.ToString();
 }
Example #3
0
 //Добавить продавца
 public void AddCashier(Cashier c)
 {
     cashiers.Add(c);
 }