Пример #1
0
        public static Notification GigPurchased(ISellingPackage sellingPackage, string sellerName)
        {
            var purchaseNotification = new Notification(NotificationType.PurchaseGig, sellerName, null);

            purchaseNotification.Message = $"{sellingPackage.PackageName} was purchased for {sellingPackage.Price}$ at {purchaseNotification.DateTime} from {purchaseNotification.SellerName}";

            return(purchaseNotification);
        }
Пример #2
0
        public static Notification GigSold(ISellingPackage sellingPackage, string buyerName)
        {
            var sellNotification = new Notification(NotificationType.SellGig, null, buyerName);

            sellNotification.Message = $"{sellingPackage.PackageName} was sold for {sellingPackage.Price}$ at {sellNotification.DateTime} to {sellNotification.BuyerName}";

            return(sellNotification);
        }
Пример #3
0
        public static Order CreateOrder(int count, ISellingPackage sellingPackage, string coupon, string sellerInstructions, int shoppingCartID, int gigID)
        {
            var order = new Order(sellingPackage.PackageName, count, sellingPackage.Price, sellingPackage.PackageDescreption, coupon, sellerInstructions, shoppingCartID, gigID);

            order.Price = count * sellingPackage.Price;

            return(order);
        }