Пример #1
0
        static void Main(string[] args)
        {
            Player player = new Player
            {
                PlayerId       = 1,
                DateOfBirth    = 1990,
                FirstName      = "xxx",
                LastName       = "yyy",
                IdentityNumber = 54321
            };
            Game game = new Game {
                GameName  = "Fallout",
                GamePrice = 10,
                GameType  = "Role Play"
            };

            GameManager gameManager = new GameManager();

            gameManager.Add(game);

            Campain campain = new Campain {
                CampainName = "You Are Not Chosen One!", BuyWithDiscount = "%23"
            };
            CampainManager campainManager = new CampainManager();

            campainManager.BuyWithDiscount(game, campain, player);
        }
Пример #2
0
        static void Main(string[] args)
        {
            IGamerService gamerManager = new GamerManager(new UserValidationManager());
            Gamer         gamer        = new Gamer
            {
                Id             = 1,
                BirthYear      = 1996,
                FirstName      = "SEVDENUR",
                LastName       = "DEMİREL",
                IdentityNumber = 12345
            };

            gamerManager.Add(gamer);

            IGameService gameManager = new GameManager();
            Game         game        = new Game {
                GameName = "League of Legends",
                Price    = 50
            };

            gameManager.Add(game);

            ICampainService campainManager = new CampainManager();
            Campain         campain        = new Campain {
                CampainName = "",
                Discount    = 0
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Sell(gamer, game, campain);

            Console.ReadLine();
        }
Пример #3
0
 public void Sell(Gamer gamer, Game game, Campain campain)
 {
     if (campain.Discount == 0)
     {
         Console.WriteLine(gamer.FirstName + " " + gamer.LastName + " " +
                           game.GameName + " adlı oyunu " + " satın aldı. Toplam ödenen tutar = " + game.Price);
     }
     else
     {
         float indirim = game.Price * campain.Discount / 100;
         float price   = game.Price - indirim;
         Console.WriteLine(gamer.FirstName + " " + gamer.LastName + " " + game.GameName + " adlı oyunu " +
                           campain.CampainName + " kampanyası ile satın aldı. Toplam ödenen tutar = " + price);
     }
 }
Пример #4
0
 public void BuyWithDiscount(Game game, Campain campain, Player player)
 {
     Console.WriteLine(player.FirstName + " " + player.LastName + " buy the " + game.GameName + ".");
 }
Пример #5
0
 public void Order(Gamer gamer, Campain campain)
 {
     Console.WriteLine("Satış başarılı!");
 }
Пример #6
0
 public void Update(Campain campain)
 {
     Console.WriteLine("Güncelleme Başarılı!");
 }
Пример #7
0
 public void Delete(Campain campain)
 {
     Console.WriteLine("Silme Başarılı!");
 }
Пример #8
0
 public void Add(Campain campain)
 {
     Console.WriteLine("Kampanya Eklendi.");
 }
Пример #9
0
 public void Add(Campain campain)
 {
     Console.WriteLine("Yeni kampanya sisteme eklendi");
 }
Пример #10
0
 public void Update(Campain campain)
 {
     Console.WriteLine("Seçili kampanya güncelleme işlemi başarılı");
 }
Пример #11
0
 public void Delete(Campain campain)
 {
     Console.WriteLine("Seçili kampanya silindi");
 }