Beispiel #1
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id        = 1;
            customer1.FirstName = "Ahmet";
            customer1.LastName  = "GÜR";
            customer1.Age       = 16;

            Customer customer2 = new Customer();

            customer2.Id        = 2;
            customer2.FirstName = "Hasan";
            customer2.LastName  = "ALTUNDAĞ";
            customer2.Age       = 25;

            Customer customer3 = new Customer();

            customer3.Id        = 3;
            customer3.FirstName = "Pelin";
            customer3.LastName  = "YILMAZ";
            customer3.Age       = 20;

            Customer customer4 = new Customer();

            customer4.Id        = 4;
            customer4.FirstName = "Merve";
            customer4.LastName  = "ASLANOBA";
            customer4.Age       = 35;

            Customer customer5 = new Customer();

            customer5.Id        = 5;
            customer5.FirstName = "Hakan";
            customer5.LastName  = "KALDIRIM";
            customer5.Age       = 30;

            CustomerManeger customerManeger = new CustomerManeger();

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

            foreach (var customer in customers)
            {
                customerManeger.GetList(customer);
            }

            Line();

            customerManeger.Add(customer1);

            Line();

            customerManeger.Delete(customer2);

            Line();

            customerManeger.Update(customer3);

            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Customer Customer1 = new Customer();

            Customer1.Name    = "Selim";
            Customer1.SurName = "Kazancı";
            Customer1.City    = "Kahramanmaraş";
            Customer1.Phone   = 1111111111;

            Customer Customer2 = new Customer();

            Customer2.Name    = "Sueda";
            Customer2.SurName = "Türk";
            Customer2.City    = "Kayseri";
            Customer2.Phone   = 1345411111;

            Customer Customer3 = new Customer();

            Customer3.Name    = "Yaşar";
            Customer3.SurName = "Sayar";
            Customer3.City    = "Kahramanmaraş";
            Customer3.Phone   = 1111487642;

            Customer Customer4 = new Customer();

            Customer4.Name    = "Turgut";
            Customer4.SurName = "Koç";
            Customer4.City    = "Rize";
            Customer4.Phone   = 1111121111;

            Customer Customer5 = new Customer();

            Customer5.Name    = "Emre";
            Customer5.SurName = "Sabancı";
            Customer5.City    = "Konya";
            Customer5.Phone   = 1345411211;

            Customer Customer6 = new Customer();

            Customer6.Name    = "Avni";
            Customer6.SurName = "Arıkan";
            Customer6.City    = "Osmaniye";
            Customer6.Phone   = 1111487632;

            Customer[]      customers       = new Customer[] { Customer1, Customer2, Customer3, Customer4, Customer5, Customer6 };
            CustomerManeger customerManeger = new CustomerManeger();

            customerManeger.Add(Customer1);
            customerManeger.Add(Customer2);
            customerManeger.Add(Customer3);
            customerManeger.Add(Customer4);
            customerManeger.Add(Customer5);
            Console.Write("----> Delete : ");
            customerManeger.Del(Customer6);

            customerManeger.List(customers);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Name    = "Gözde";
            customer1.Surname = "Toz";
            Customer customer2 = new Customer();

            customer2.Name    = "Tuncay";
            customer2.Surname = "Can";
            Customer customer3 = new Customer();

            customer3.Name    = "Burak";
            customer3.Surname = "Toz";

            CustomerManeger customerManager = new CustomerManeger();

            customerManager.Add(customer1);
            customerManager.Get(customer1, customer2, customer3);
            customerManager.Delete(customer3);
        }