Esempio n. 1
0
        static void Main(string[] args)
        {
            Musteri customer1 = new Musteri();

            customer1.Id              = 10;
            customer1.CustomerName    = "Alican";
            customer1.CustomerSurname = " Kaplancı";
            customer1.CustomerAge     = 19;

            Musteri customer2 = new Musteri();

            customer2.Id              = 9;
            customer2.CustomerName    = "Ali";
            customer2.CustomerSurname = " Kaplancı";
            customer2.CustomerAge     = 51;

            Musteri[] customers = new Musteri[] { customer1, customer2 };

            MusteriManager CustomerManager = new MusteriManager();

            Console.WriteLine("Ekle");
            MusteriManager.AddCustomer(customer1);

            Console.WriteLine("Sil");
            MusteriManager.DeleteCustomer(customer2);

            Console.WriteLine("Listele");
            MusteriManager.CustomerList(customers);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Musteri customer1 = new Musteri()
            {
                Id       = 100,
                Ad       = "Alexi",
                Soyad    = "Laiho",
                Yas      = 41,
                Cinsiyet = "Erkek",
                Hometown = "Helsinki - Finland"
            };

            Musteri customer2 = new Musteri()
            {
                Id       = 99,
                Ad       = "Gene",
                Soyad    = "Haas",
                Yas      = 75,
                Cinsiyet = "Erkek",
                Hometown = "Ohio - USA"
            };

            Musteri[] customers = new Musteri[]
            {
                customer1, customer2
            };
            foreach (var Musteri in customers)
            {
                Console.WriteLine("Ad: " + Musteri.Ad);
                Console.WriteLine("Soyad: " + Musteri.Soyad);
                Console.WriteLine("Yaş: " + Musteri.Yas);
                Console.WriteLine("Cinsiyet: " + Musteri.Cinsiyet);
                Console.WriteLine("Şehir: " + Musteri.Hometown);
                Console.WriteLine();
            }

            MusteriManager manager = new MusteriManager();

            manager.AddCustomer(customer1);
            manager.AddCustomer(customer2);
            manager.DeleteCustomer(customer2);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Musteri musteri1 = new Musteri();

            musteri1.Id      = 11;
            musteri1.Name    = "Ayşegül";
            musteri1.Surname = "Kaplan";
            musteri1.Age     = 26;
            musteri1.Balance = 40000;

            Musteri musteri2 = new Musteri();

            musteri2.Id      = 22;
            musteri2.Name    = "Ramazan";
            musteri2.Surname = "Demirhan";
            musteri2.Age     = 29;
            musteri2.Balance = 41000;

            Musteri[] musteriler = new Musteri[] { musteri1, musteri2 };

            foreach (var musteri in musteriler)
            {
                Console.WriteLine("Customer Id : " + musteri.Id);
                Console.WriteLine("Customer Name : " + musteri.Name);
                Console.WriteLine("Customer Surname : " + musteri.Surname);
                Console.WriteLine("Customer Age : " + musteri.Age);
                Console.WriteLine("Customer Balance : " + musteri.Balance);
                Console.WriteLine("----------------");
            }

            MusteriManager musteriManager = new MusteriManager();

            musteriManager.AddCustomer(musteri1);
            musteriManager.AddCustomer(musteri2);
            musteriManager.ShowCustomer(musteri1);
            musteriManager.ShowCustomer(musteri2);
            musteriManager.UpdateCustomer(musteri1);
            musteriManager.UpdateCustomer(musteri2);
            musteriManager.DeleteCustomer(musteri1);
            musteriManager.DeleteCustomer(musteri2);
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            Musteri musteri1 = new Musteri();

            musteri1.Id          = 102936;
            musteri1.Name        = "Mark";
            musteri1.Surname     = "Zuckerberg";
            musteri1.CreditPoint = 9;

            Musteri musteri2 = new Musteri();

            musteri2.Id          = 213843;
            musteri2.Name        = "Elon";
            musteri2.Surname     = "Musk";
            musteri2.CreditPoint = 8;

            Musteri musteri3 = new Musteri();

            musteri3.Id          = 787421;
            musteri3.Name        = "Faber";
            musteri3.Surname     = "Castell";
            musteri3.CreditPoint = 5;

            Musteri[] musteriler = new Musteri[] { musteri1, musteri2, musteri3 };

            MusteriManager musteriManager = new MusteriManager();

            Console.WriteLine("---------------------Customer-Add---------------------------");
            musteriManager.AddCustomer(musteri1);
            musteriManager.AddCustomer(musteri2);
            musteriManager.AddCustomer(musteri3);
            Console.WriteLine("---------------------Customer-Del---------------------------");
            musteriManager.DelCustomer(musteri1);
            musteriManager.DelCustomer(musteri2);
            musteriManager.DelCustomer(musteri3);
            Console.WriteLine("---------------------Customer-List---------------------------");
            musteriManager.ListAllCustomers(musteriler);
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id      = 1;
            customer1.Name    = "Semih";
            customer1.Surname = "Çankaya";
            customer1.Age     = 25;

            Customer customer2 = new Customer();

            customer2.Id      = 2;
            customer2.Name    = "Mehmet";
            customer2.Surname = "Önemli";
            customer2.Age     = 23;

            Customer customer3 = new Customer();

            customer3.Id      = 3;
            customer3.Name    = "Elif nur";
            customer3.Surname = "Önemli";
            customer3.Age     = 18;

            Customer customer4 = new Customer();

            customer4.Id      = 4;
            customer4.Name    = "Selim";
            customer4.Surname = "Kaya";
            customer4.Age     = 22;

            Customer customer5 = new Customer();

            customer5.Id      = 5;
            customer5.Name    = "Kerem";
            customer5.Surname = "Say";
            customer5.Age     = 19;

            Customer[] customers = new Customer[] { customer1, customer2, customer3, customer4, customer5 };

            MusteriManager musteriManager = new MusteriManager();

            musteriManager.AddCustomer(customer1);
            musteriManager.DeleteCustomer(customer2);
            musteriManager.ListCustomer(customers);
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            var customer = new Musteri()
            {
                ID      = 53,
                Name    = "Umit",
                SurName = "Yavuz"
            };


            MusteriManager musteriManager = new MusteriManager();

            musteriManager.ListCustomer(customer);
            musteriManager.AddCustomer(customer);
            musteriManager.RemoveCustomer(customer);

            Console.ReadLine();
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            Musteri m = new Musteri();

            m.MusteriId    = 1;
            m.MusteriAd    = "Ferdi";
            m.MusteriSoyad = "Temurtaş";
            MusteriManager.AddCustomer(m);

            m              = new Musteri();
            m.MusteriId    = 2;
            m.MusteriAd    = "Tayfun";
            m.MusteriSoyad = "Temurtaş";

            MusteriManager.AddCustomer(m);

            var result = MusteriManager.ListCustomers();

            foreach (var item in result)
            {
                Console.WriteLine(item.MusteriAd + item.MusteriSoyad + item.MusteriId);
            }
        }