public virtual PackageSlipDetails GeneratePackageSlip(Product prod)
        {
            PackageSlipDetails packageSlipDetails = new PackageSlipDetails();

            packageSlipDetails.PackageSlipName    = "Packaging for " + prod.ProductName;
            packageSlipDetails.ProductDescription = prod.ProductType.ToString();
            Console.WriteLine($"{string.Format(packageSlipDetails.PackageSlipName, ",", packageSlipDetails.ProductDescription)}");
            return(packageSlipDetails);
        }
Example #2
0
        //public bool DoPayments(Product prod)
        //{
        //    bool isSuccess = false;
        //    //Do Payment
        //    isSuccess = true;
        //    return isSuccess;

        //}

        public bool DoActionsPhyscial(Product prod, PhyscialMaster physcialMaster)
        {
            bool isSuccess = false;

            //DoActions

            if (prod.ProductType == ProductPaymentType.Physical)
            {
                PhyscialProduct    physcialProduct    = new  PhyscialProduct();
                PackageSlipDetails packageSlipDetails = physcialMaster.GeneratePackageSlip(prod);
                CommissionPayment  commissionPayment  = physcialMaster.GenerateCommisionPayment(prod);
            }
            else if (prod.ProductType == ProductPaymentType.Book)
            {
                BookProduct        bookProduct        = new BookProduct();
                PackageSlipDetails packageSlipDetails = bookProduct.GeneratePackageSlip(prod);
                CommissionPayment  commissionPayment  = bookProduct.GenerateCommisionPayment(prod);
            }

            isSuccess = true;
            return(isSuccess);
        }