Ejemplo n.º 1
0
 public void Update(Gamer gamer)
 {
     Console.WriteLine("Deleted");
 }
Ejemplo n.º 2
0
 public void Buy(Game game, Gamer gamer)
 {
     Console.WriteLine(gamer.UserName + " kullanıcı " + game.Name + " adlı oyunu satın aldı.");
 }
 public bool Validate(Gamer gamer)
 {
     return(true);
 }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            //Oyuncular
            Gamer gamer1 = new Gamer();

            gamer1.GamerId       = 1;
            gamer1.FirstName     = "merve";
            gamer1.LastName      = "aydın";
            gamer1.NationalityId = "12345";
            gamer1.DateOfBirth   = new DateTime(1992, 10, 10);

            Gamer gamer2 = new Gamer();

            gamer2.GamerId       = 2;
            gamer2.FirstName     = "ferhat";
            gamer2.LastName      = "aydın";
            gamer2.NationalityId = "123456";
            gamer2.DateOfBirth   = new DateTime(1985, 2, 1);

            Gamer gamer3 = new Gamer();

            gamer3.GamerId       = 3;
            gamer3.FirstName     = "esra";
            gamer3.LastName      = "aydın";
            gamer3.NationalityId = "1234567";
            gamer3.DateOfBirth   = new DateTime(1995, 1, 1);


            //Kampanyalar
            Campaign campaign1 = new Campaign();

            campaign1.CampaignId    = 10;
            campaign1.CampaignName  = "kış ";
            campaign1.CampaignValue = "%5";

            Campaign campaign2 = new Campaign();

            campaign2.CampaignId    = 11;
            campaign2.CampaignName  = "tatil  ";
            campaign2.CampaignValue = "%10";

            Campaign campaign3 = new Campaign();

            campaign3.CampaignId    = 12;
            campaign3.CampaignName  = "yaz ";
            campaign3.CampaignValue = "%15";

            //Oyunlar

            Game game1 = new Game();

            game1.GameId    = 5;
            game1.GameName  = "tetris";
            game1.GamePrice = 100.0;

            IGamerService gamerService = new GamerManager(new GamerCheckManager());

            gamerService.Save(gamer1);
            gamerService.Update(gamer2);
            gamerService.Delete(gamer3);

            Console.WriteLine("----------------------------");

            ICampaignService campaignService = new CampaignService();

            campaignService.Add(campaign3);
            campaignService.Delete(campaign2);
            campaignService.Update(campaign1);

            Console.WriteLine("----------------------------");

            IGameSellService gameSellService = new GameManager();

            gameSellService.Sell(gamer2, game1, campaign2);
        }
Ejemplo n.º 5
0
 public void BuyWithCampaign(Game gameV, Campaign campaignV, Gamer gamerV)
 {
     Console.WriteLine(gamerV.GamerFirstName + " " + gamerV.GamerLastName + " bought " + gameV.GameName + " with " + campaignV.CampaignDiscountAmount + "% discount using " + campaignV.CampaignName);
 }
Ejemplo n.º 6
0
 public void Delete(Gamer gamer)
 {
     Console.WriteLine("User deleted !!");
 }
Ejemplo n.º 7
0
 public bool CheckIfRealPerson(Gamer gamer)
 {
     return(true);
 }
Ejemplo n.º 8
0
 public virtual void Save(Gamer gamer)
 {
     Console.WriteLine("Saved to db: " + gamer.FirstName);
 }
Ejemplo n.º 9
0
 public void Update(Gamer gamer)
 {
     Console.WriteLine(gamer.FirstName + " : Updated !!");
 }
Ejemplo n.º 10
0
 public virtual void Kayit(Gamer gamer)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 11
0
 public void Delete(Gamer gamer)
 {
     Console.WriteLine("Müşteri Kaydı Silindi");
 }
Ejemplo n.º 12
0
 public void Update(Gamer gamer)
 {
     Console.WriteLine(gamer.FirstName + "kullanıcı bilgileri güncellendi.");
 }
Ejemplo n.º 13
0
 public void Save(Gamer gamer)
 {
     Console.WriteLine(gamer.FirstName + " Kullanıcı kayıt edildi.");
 }
Ejemplo n.º 14
0
 public void Sale(Games games, Gamer gamer)
 {
     Console.WriteLine(games.Name + " purchased by " + gamer.FirstName);
 }
Ejemplo n.º 15
0
 public void Delete(Gamer gamer)
 {
     Console.WriteLine("Gamer has been deleted!");
 }
Ejemplo n.º 16
0
 public void Update(Gamer gamer)
 {
     Console.WriteLine("Gamer information has been updated!");
 }