示例#1
0
        static void Main(string[] args)
        {
            //Customer customer1 = new Customer();
            //customer1.Name = "Kerem";
            //customer1.Surname = "Yılmaz";
            //customer1.Id = 1;
            //customer1.TcNumber = "2222222";
            //customer1.CustomerNumber = "33333";
            //customer1.CompanyName = "????";

            // Eğer bir objeyle alakası olmayan bir prop varsa burda kalıtım kullanmak mantıklı olandır


            RealCustomer realCustomer = new RealCustomer();

            realCustomer.Id         = 1;
            realCustomer.CustomerNo = "12345";
            realCustomer.Name       = "Kerem Burak";
            realCustomer.Surname    = "Yılmaz";
            realCustomer.TcNumber   = "12346874";

            CorporateCustomer corporateCustomer = new CorporateCustomer();

            corporateCustomer.Id          = 2;
            corporateCustomer.CustomerNo  = "324342";
            corporateCustomer.CompanyName = "Kodlama.io";
            corporateCustomer.TaxNumber   = "893472";

            Customer customer1 = new RealCustomer();                //parent sınıf iki child sınıfı da tutabilir
            Customer customer2 = new CorporateCustomer();

            CustomerManager customerManager = new CustomerManager();   //şu anda hem RealCustomer hem CorporateCustomer gönderebilirim
        }
示例#2
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id         = 1;
            customer1.CustomerNo = "12345";
            customer1.FirstName  = "Aysu";
            customer1.LastName   = "Gökcen";
            customer1.TcNumb     = "12345678910";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id          = 2;
            customer2.CustomerNo  = "54321";
            customer2.CompanyName = "Kodlama.io";
            customer2.TaxNumb     = "1234567890";

            //Gerçek-Tüzel
            //SOLID

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#3
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.CustomerNo = "12345";
            customer1.Name       = "Guney";
            customer1.Surname    = "Sanli";
            customer1.Id         = 1;
            customer1.IdNo       = "123";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.CustomerNo  = "21342";
            customer2.CompanyName = "Coder.io";
            customer2.Id          = 2;
            customer2.TaxNo       = "1323";

            //Gerçek müsteri - tüzel müsteri
            //SOLID - L

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


            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
            customerManager.Add(customer3);
            customerManager.Add(customer4);
        }
示例#4
0
        static void Main(string[] args)
        {
            //Emre Aka
            RealCustomer customer1 = new RealCustomer();

            customer1.Id               = 1;
            customer1.CustomerNo       = "12345";
            customer1.CustomerName     = "Emre";
            customer1.CustomerLastName = "Aka";
            customer1.SocialSecurityNo = "123456789";
            //Kodlama.io
            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id          = 2;
            customer2.CustomerNo  = "51234";
            customer2.CompanyName = "Kodlama.io";
            customer2.TaxNo       = "123634213";
            //Real customer - Legal costomer
            //SOLID

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#5
0
        static void Main(string[] args)
        {
            //gerçek müşteri girişi
            RealCustomer musteri1 = new RealCustomer();

            musteri1.Id        = 1;
            musteri1.MusteriNo = "12345";
            musteri1.Adi       = "Engin";
            musteri1.Soyadi    = "Dmiroğ";
            musteri1.TcNo      = "22222222222222";


            //tüzel müşteri girişi
            JuridicalCustomer musteri2 = new JuridicalCustomer();

            musteri2.Id        = 2;
            musteri2.MusteriNo = "264645";
            musteri2.SirketAdi = "Kodlama.io";
            musteri2.VergiNo   = "65656565965";



            // Gerçek Müşteri-Tüzel Müşteri
            // SOLID

            Customer musteri3 = new RealCustomer();  //new biçim için referans numarasını yansıtır. Müşteri sınıfı hem gerçek hem tüzel referansını tutar.
            Customer musteri4 = new JuridicalCustomer();

            CustomerManager musteriManager = new CustomerManager();

            musteriManager.Ekle(musteri1);
            musteriManager.Ekle(musteri2);
        }
示例#6
0
        static void Main(string[] args)
        {
            //müşteri kişi olduğunda CompanyName sıkıntı olur.
            RealCustomer customer1 = new RealCustomer();

            customer1.Id             = 1;
            customer1.CustomerNumber = "12345";
            customer1.FirtsName      = "ismail";
            customer1.LastName       = "demirci";
            customer1.TcNo           = "123456789";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id             = 2;
            customer2.CompanyName    = "Youtube";
            customer2.TaxNumber      = "124563";
            customer2.CustomerNumber = "123456";



            //Gerçek-Tüzel
            //SOLID

            Customer customer3 = new RealCustomer();
            Customer customer4 = new LegalCustomer();
            //Customer ikisininde referansını tutabiliyor çünkü ebeveyn

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
            customerManager.Add(customer3);
            //oluşturulan tüm müşterileri yollayabiliyoruz
        }
示例#7
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id         = 1;
            customer1.CustomerId = "12345";
            customer1.Name       = "Aleyna";
            customer1.Surname    = "Senozan";
            customer1.ID_no      = "12345678910";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id          = 2;
            customer2.CustomerId  = "54321";
            customer2.CompanyName = "Creative.io";
            customer2.TaxNumber   = "1234567890";

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#8
0
        static void Main(string[] args)
        {
            RealCustomer realCustomer1 = new RealCustomer();

            realCustomer1.CustomerNumber = "12345";
            realCustomer1.FirstName      = "Faruk";
            realCustomer1.LastName       = "Kardaş";
            realCustomer1.TcNo           = "154587412226";
            realCustomer1.Id             = 2;

            CorporateCustomer corporateCustomer1 = new CorporateCustomer();

            corporateCustomer1.CompanyName    = "Kardaş Holding";
            corporateCustomer1.TaxNumber      = "15678915";
            corporateCustomer1.Id             = 1;
            corporateCustomer1.CustomerNumber = "15645674";

            Customer customer1 = new RealCustomer();
            Customer customer2 = new CorporateCustomer();

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#9
0
        static void Main(string[] args)
        {
            //Yasir Demirci
            RealCustomer customer1 = new RealCustomer();

            customer1.Id               = 1;
            customer1.CustomerNumber   = "100001";
            customer1.CustomerName     = "Yasir";
            customer1.CustomerLastName = "Demirci";
            customer1.TCNumber         = "100000000000";
            //-----------------------------------

            //Malik Demirci
            CoorporateCustomer customer2 = new CoorporateCustomer();

            customer2.Id               = 2;
            customer2.CustomerNumber   = "200002";
            customer1.CustomerName     = "Malik";
            customer1.CustomerLastName = "Demirci";
            customer1.TCNumber         = "200000000000";

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
            Console.WriteLine("---------------------------------------------------");
        }
示例#10
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id         = 1;
            customer1.CustomerNo = "12345";
            customer1.Name       = "Beyza";
            customer1.Surname    = "Yayla";
            customer1.TcNo       = "1234567890";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id          = 2;
            customer2.CustomerNo  = "54321";
            customer2.CompanyName = "Kodlama.io";
            customer2.TaxNo       = "12345678945";

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#11
0
        static void Main(string[] args)
        {
            //Engin Demiroğ
            RealCustomer customer1 = new RealCustomer();

            customer1.Id      = 1;
            customer1.No      = "12345";
            customer1.Name    = "Engin";
            customer1.SurName = "Demiroğ";
            customer1.TcNo    = "123456789";


            //Kodlama.IO
            CorporateCustomer customer2 = new CorporateCustomer();

            customer2.Id          = 2;
            customer2.No          = "54321";
            customer2.CompanyName = "Kodlama.IO";
            customer2.FeeNo       = "1234567890";

            Customer customer3 = new RealCustomer(); //inheritance'dan dolayı tüm classları tutabiliyor
            Customer customer4 = new CorporateCustomer();

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#12
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);
        }
示例#13
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.CustomerNumber = "12345";
            customer1.FirstName      = "İsmail";
            customer1.LastName       = "Coşar";
            customer1.TcNumber       = "12345678910";


            CoorporateCustomer customer2 = new CoorporateCustomer();

            customer2.Id             = 2;
            customer2.CustomerNumber = "54321";
            customer2.TaxNumber      = "1234567890";
            customer2.CompanyName    = "CSR";



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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer(); //Gerçek

            customer1.Id             = 1;
            customer1.CustomerNumber = "12345";
            customer1.Name           = "Atakan";
            customer1.Surname        = "Çiğdem";
            customer1.TcNumber       = "12345678910";

            CorporateCustomer customer2 = new CorporateCustomer(); //Tüzel

            customer2.Id             = 2;
            customer2.CustomerNumber = "54321";
            customer2.CompanyName    = "Jupiterus";
            customer2.TaxNumber      = "1234567890";

            //Gerçek Müşteri - Tüzel Müşteri
            //SOLID - L

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#15
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id         = 1;
            customer1.CustomerNo = "12345";
            customer1.FirstName  = "Raşit";
            customer1.LastName   = "ALIMCI";
            customer1.TcNo       = "11111111111";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id          = 2;
            customer2.CustomerNo  = "123456";
            customer2.CompanyName = "ALIMCI HOLDİNG";
            customer2.TaxNo       = "2222222222";

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
            customerManager.Add(customer3);
            customerManager.Add(customer4);
        }
示例#16
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id             = 2;
            customer1.CustomerNumber = "12345";
            customer1.Name           = "ibrahim";
            customer1.LastName       = "Alzamel";
            customer1.TcNumber       = "0123456789";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id             = 2;
            customer2.CustomerNumber = "54321";
            customer2.CompanyNumber  = "alzamel";
            customer2.TaxNumber      = "1234567890";

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
            customerManager.Add(customer3);
            customerManager.Add(customer4);
        }
示例#17
0
        static void Main(string[] args)
        {
            RealCustomer realCustomer = new RealCustomer();

            realCustomer.ID = 5;
            RegalCustomer regalCustomer = new RegalCustomer();

            regalCustomer.ID = 3;

            Customer customer  = new RealCustomer();
            Customer customer1 = new RegalCustomer();
        }
示例#18
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");


            //Customer customer = new Customer
            //{
            //    Id = 1,
            //    Name = "Oğuzhan",
            //    LastName = "Mollaoğlu",
            //    IdentityNo = "12123533256",
            //    CustomerNo = "12345",
            //    CompanyName = "?"
            //};

            //Gerçek Müşteri - Tüzel Müşteri
            //SOLID

            //Oğuzhan Mollaoğlu
            RealCustomer realCustomer = new RealCustomer
            {
                Id         = 1,
                CustomerNo = "12345",
                Name       = "Oğuzhan",
                LastName   = "Mollaoğlu",
                IdentityNo = "12343245676"
            };

            //Kodlama.io

            CoorporateCustomer coorporateCustomer = new CoorporateCustomer
            {
                Id          = 2,
                CompanyName = "Kodlama.io",
                TaxNo       = "123456789"
            };

            // müşteri hem gerçek hem tüzel müşteri olabiliyor
            // new lenmek demek o nesnenin referans no'sudur.
            Customer customer1 = new RealCustomer();
            Customer customer2 = new CoorporateCustomer();


            // görüldüğü üzere tek bir ekleme methodu ile ikisinde ekleyebildik
            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
示例#19
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.CustomerId      = 1;
            customer1.CustomerNo      = "00001";
            customer1.TcNo            = "444444444444";
            customer1.CustomerName    = "Ahmet";
            customer1.CustomerSurname = "Tanrıkulu";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.CustomerId  = 2;
            customer2.CustomerNo  = "00002";
            customer2.TaxNo       = "1234567890";
            customer2.CompanyName = "Tannet";

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
        }
示例#20
0
        static void Main(string[] args)
        {
            RealCustomer musteri1 = new RealCustomer();

            musteri1.CustomerName    = "Ahmet";
            musteri1.CustomerSurname = "Yalamayısever";
            musteri1.CustomerNumber  = " 123";
            musteri1.Id             = 1;
            musteri1.IdentityNumber = "23333333";


            CorparateCustomer musteri2 = new CorparateCustomer();

            musteri2.Id             = 2;
            musteri2.CustomerNumber = "322";
            musteri2.CompanyName    = "AmatistKonutları";
            musteri2.TaxId          = "2351";

            Customer musteri3 = new CorparateCustomer();
            Customer musteri4 = new RealCustomer();
            //Customer her iki classı da tutar
        }