Example #1
0
        static void Main(string[] args)
        {
            Indıvidual ındıvidual1 = new Indıvidual();

            ındıvidual1.Id        = 12;
            ındıvidual1.MusteriNo = "12345";
            ındıvidual1.Adı       = "Bayram";
            ındıvidual1.Soyadı    = "Taş";
            ındıvidual1.TcNo      = "123456789";


            //  kodlama

            Coorporate coorporate1 = new Coorporate();

            coorporate1.Id        = 45;
            coorporate1.MusteriNo = "54321";
            coorporate1.SirketAdı = "kodlama";
            coorporate1.VergiNo   = "159357";


            Customer customer3 = new Coorporate();
            Customer customer4 = new Indıvidual();

            CustomerManeger customerManeger = new CustomerManeger();

            customerManeger.Add(ındıvidual1);
            customerManeger.Add(coorporate1);
        }
Example #2
0
        static void Main(string[] args)
        {
            GercekMusteri musteri = new GercekMusteri();

            musteri.Id        = 1;
            musteri.MusteriNo = "12345";
            musteri.Adi       = "Onur";
            musteri.Soyadi    = "Vuran";

            TuzelMusteri musteri1 = new TuzelMusteri();

            musteri1.Id        = 1;
            musteri1.SirketAdi = "THY";
            musteri1.VergiNo   = "1234567890";

            //SOLID

            Musteri musteri2 = new GercekMusteri();
            Musteri musteri3 = new TuzelMusteri();

            CustomerManeger customerManeger = new CustomerManeger();

            customerManeger.Ekle(musteri);
            customerManeger.Ekle(musteri3);
        }
Example #3
0
        static void Main(string[] args)
        {
            RealClient client1 = new RealClient();

            client1.ClientNumber = "12345";
            client1.FirstName    = "Oguzhan";
            client1.LastName     = "Bilgic";
            client1.IdentityNo   = "12345678910";


            CorporateClient client2 = new CorporateClient();

            client2.Id           = 2;
            client2.ClientNumber = "54321";
            client2.CompanyName  = "Keove";
            client2.TaxNo        = "1234567890";

            Client client3 = new RealClient();
            Client client4 = new CorporateClient();

            CustomerManeger customerManeger = new CustomerManeger();

            customerManeger.Add(client1);
            customerManeger.Add(client2);
        }
Example #4
0
        static void Main(string[] args)
        {
            // Gerçek müşteri -- Tüzel Müşteri
            //SOLID



            RealCustomer customer = new RealCustomer();

            customer.Id             = 1;
            customer.CustomerNumber = 12345;
            customer.FirstName      = "Ersin";
            customer.LastName       = "Alp";
            customer.TcNo           = "123456788990";



            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id             = 2;
            customer2.CompanyName    = "Creade Technology";
            customer2.CustomerNumber = 654543;
            customer2.TaxNumber      = "1236543453";

            Customer customer3 = new RealCustomer();
            Customer customer4 = new LegalCustomer();


            CustomerManeger customerManeger = new CustomerManeger();

            customerManeger.Add(customer);
            customerManeger.Add(customer2);
        }
Example #5
0
        static void Main(string[] args)
        {
            IndividualCustomer customer1 = new IndividualCustomer();

            customer1.Id         = 1;
            customer1.CustomerNo = "12345";
            customer1.TcNo       = "27493064090";
            customer1.Name       = "Kadir";
            customer1.FirstName  = "Kaya";


            CoorporateCustomer customer2 = new CoorporateCustomer();

            customer2.Id          = 2;
            customer2.CustomerNo  = "54321";
            customer2.CompanyName = "Kodlama.ıo";
            customer2.TaxNo       = "9876543210";


            Customer customer3 = new IndividualCustomer();      // Burda dikkat edersek müsteri gercek müsteriyi de tutabiliyor tüzel müşteriyi de tutabiliyor
            Customer customer4 = new CoorporateCustomer();      // Yani müsteri classı hem gercek müsterinin referansını tutabiliyor hem de tüzel müşterinin

            CustomerManeger customerManeger = new CustomerManeger();

            customerManeger.Add(customer1);
            customerManeger.Add(customer2);
            customerManeger.Add(customer3);
            customerManeger.Add(customer4);
        }