Ejemplo n.º 1
0
        public MembershipMaster InitiliazeMembership(Product prod)
        {
            MembershipMaster memberShipMaster = null;

            if (prod.ProductType == ProductPaymentType.BasicMemberShip)
            {
                memberShipMaster = new BasicMembership();
            }
            else if (prod.ProductType == ProductPaymentType.PremierMemberShip)
            {
                memberShipMaster = new PremierMemberShip();
            }
            return(memberShipMaster);
        }
Ejemplo n.º 2
0
        public bool DoActionsMembership(Product prod, MembershipMaster membershiplMaster)
        {
            bool isSuccess = false;

            //DoActions

            if (prod.ProductType == ProductPaymentType.BasicMemberShip)
            {
                BasicMembership basicMembership = new BasicMembership();
                bool            IsActivated     = basicMembership.Activate(prod);
                //bool commissionPayment = basicMembership.IsActivated(prod);
            }
            else if (prod.ProductType == ProductPaymentType.Book)
            {
                PremierMemberShip premierMemberShip = new PremierMemberShip();
                Product           product           = premierMemberShip.Upgrade(prod);
                bool isNotified = premierMemberShip.NotifyOwners(prod);
            }


            isSuccess = true;
            return(isSuccess);
        }