Exemple #1
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new MernisServiceAdapter());
            Frisky       frisky       = new Frisky {
                Id = 1, FirstName = "Murat", LastName = "Dursun", Date = new DateTime(2000, 08, 21), IdentityID = 27571468336
            };

            gamerManager.Add(frisky);
            gamerManager.Update(frisky);
            gamerManager.Delete(frisky);

            GameManager gameManager = new GameManager();
            Game        game        = new Game {
                Id = 1, Name = "7 Days To Die", UnitPrice = 70
            };

            gameManager.Add(game);
            gameManager.Update(game);
            gameManager.Delete(game);

            CampaignManager campaignManager = new CampaignManager();
            Campaign        campaign        = new Campaign {
                Id = 1, Name = "Discount on game", Discount = 30
            };

            campaignManager.Add(campaign);
            campaignManager.Update(campaign);
            campaignManager.Delete(campaign);

            SaleManager saleManager = new SaleManager();

            saleManager.Sale(frisky, game);

            saleManager.CampaignSale(frisky, game, campaign);
        }
Exemple #2
0
 public override void Add(Frisky frisky)
 {
     if (gamerCheckService.CheckIfRealPerson(frisky))
     {
         base.Add(frisky);
     }
     else
     {
         throw new Exception("Not a valid person");
     }
 }
Exemple #3
0
 public override void Update(Frisky frisky)
 {
     Console.WriteLine("'" + frisky.FirstName + " " + frisky.LastName + "'" + " Users Updated.");
 }
Exemple #4
0
 public virtual void Add(Frisky frisky)
 {
     Console.WriteLine(" " + frisky.FirstName + " user added.");
 }
Exemple #5
0
 public virtual void Update(Frisky frisky)
 {
     Console.WriteLine(frisky.FirstName + "user updated.");
 }
Exemple #6
0
 public virtual void Delete(Frisky frisky)
 {
     Console.WriteLine(frisky.FirstName + " user deleted.");
 }
Exemple #7
0
 public void CampaignSale(Frisky frisky, Game game, Campaign campaign)
 {
     Console.WriteLine("'" + frisky.FirstName + " " + frisky.LastName + "'" + " purchased the game named " + "'" + game.Name + "' with " + campaign.Discount + " % discount");
 }
Exemple #8
0
 public void Sale(Frisky frisky, Game game)
 {
     Console.WriteLine("'" + frisky.FirstName + " " + frisky.LastName + "'" + " purchased the game named " + "'" + game.Name + "'");
 }