Exemplo n.º 1
0
 public void Buy(Sale sale, Gamer gamer)
 {
     Console.WriteLine(gamer.Firstname + " " + gamer.Lastname + " isimli kişi" + sale.GameName + " oyununu " + sale.Price + " TL'ye satın almıştır ");
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new MernisServiceAdapter());

            gamerManager.Add(new Gamer {
                DateOfBirth = new DateTime(1998, 05, 28), FirstName = "Rumeysa", LastName = "Koçak", NationalityId = "564644"
            });

            Game game1 = new Game()
            {
                GameId = 1, GameName = "CS:GO", GamePrice = 600
            };
            Game game2 = new Game()
            {
                GameId = 2, GameName = "LOL", GamePrice = 580
            };
            Game game3 = new Game()
            {
                GameId = 3, GameName = "PUBG", GamePrice = 700
            };
            Game game4 = new Game()
            {
                GameId = 4, GameName = "AMONG US", GamePrice = 850
            };


            Campaign campaign1 = new Campaign()
            {
                CampaignName = "New Member Campaign", DiscountRate = 25, CampaignId = 3
            };
            Campaign campaign2 = new Campaign()
            {
                CampaignName = "Valentines Day Campaign", DiscountRate = 40, CampaignId = 4
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign2);
            campaignManager.Add(campaign1);
            campaignManager.Delete(campaign1);
            campaignManager.Delete(campaign2);
            campaignManager.Update(campaign1);
            campaignManager.Update(campaign2);


            Sale sale1 = new Sale()
            {
                GameId = 1, CampaignId = 1
            };
            Sale sale2 = new Sale()
            {
                GameId = 3, CampaignId = 2
            };

            SaleManager saleManager = new SaleManager();

            saleManager.Add(sale2);
            saleManager.Add(sale1);
            saleManager.Delete(sale2);
            saleManager.Delete(sale1);
            saleManager.Update(sale1);
            saleManager.Update(sale2);

            Console.ReadLine();
        }
Exemplo n.º 3
0
 internal void Buy(Sale sale, object gamer)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public void Sell(Sale sale)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public void Add(Campaign campaign, Sale sale)
 {
     Console.WriteLine(sale.GameName + " oyununda " + campaign.CampanignName + " kapmanyası başladı %" + campaign.CampaignPercent + " indirim!!");
 }
Exemplo n.º 6
0
 public void Update(Campaign campaign, Sale sale)
 {
     Console.WriteLine(sale.GameName + " oyununda kampanya güncellendi!!");
 }
Exemplo n.º 7
0
 public void Delete(Campaign campaign, Sale sale)
 {
     Console.WriteLine(sale.GameName + " oyununda " + campaign.CampanignName + " kampanyası bitti.");
 }