public BuyTransaction(User user, DateTime date, Product product) : base(user, date)
 {
     Product = product;
 }
Exemple #2
0
        public BuyTransaction BuyProduct(User user, Product product)
        {
            BuyTransaction buyproduct = new BuyTransaction(user, DateTime.Now, product);

            buyproduct.Execute();

            transactionlog.WriteTransactionLog(buyproduct);

            CompletedTransactions.Add(buyproduct);

            return buyproduct;
        }