static void Main(string[] args)
        {
            Campaigns campaign = new Campaigns
            {
                CampaignId   = 1,
                CampaignName = "Black Friday",
                DiscountRate = 20
            };
            CampaignManager campaignManager = new CampaignManager();


            Customers customer = new Customers
            {
                FirstName            = "Muhammet",
                LastName             = "Şanverdi",
                BirthYear            = 1997,
                IdentificationNumber = 2341343124
            };
            CustomerManager customerManager = new CustomerManager(new CustomerVerificationManager());

            customerManager.Add(customer);

            Games game = new Games
            {
                GameId    = 1,
                GameName  = "Crysis 3",
                GameType  = "Action",
                GamePrice = 150,
            };
            Games game1 = new Games
            {
                GameId    = 2,
                GameName  = "Dark Souls 3",
                GameType  = "Adventure",
                GamePrice = 300,
            };
            GameManager gameManager = new GameManager();

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

            campaignManager.Add(campaign);
            GameSaleManager gameSaleManager = new GameSaleManager(campaign, game);

            gameSaleManager.GameSale(game1, campaign, customer);
            campaignManager.Delete(campaign);
            gameManager.Delete(game);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Member m1 = new Member()
            {
                Id          = 1,
                Ad          = "Aykut",
                Soyad       = "Şahin",
                DogumTarihi = "23.07.1998",
                MusteriNo   = "22892",
                TcNo        = "528023614577"
            };

            Sales sales = new Sales();

            sales.SalesId   = 1;
            sales.Sellby    = DateTime.Now;
            sales.SalePrice = 350;

            CampaignServices halfDicountCampaign = new HalfDiscountCampaign(); // Kampanya Bilgisini Seçtik

            MemberManager memberManager = new MemberManager();

            memberManager.Add(m1); // Müşteri Ekle

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(halfDicountCampaign);

            halfDicountCampaign.MakeCampaign(); // Kampanya Oluştur

            SalesManager salesManager = new SalesManager();

            salesManager.Sell(m1, sales, halfDicountCampaign);

            Record record = new Record();

            record.RecordId           = 1;
            record.RecordDate         = DateTime.Now;
            record.VerificationStatus = true;
            Console.Write("Kayıt Bilgisi: ");
            RecordManager recordManager       = new RecordManager();
            Verification  verificationService = new E_DevletVerification();

            recordManager.Register(record, verificationService);
        }