Beispiel #1
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer
            {
                Id      = 1,
                Name    = "Gülşah",
                Surname = "Başboğa",
                Address = "Kadıköy"
            };

            Customer customer2 = new Customer
            {
                Id      = 2,
                Name    = "Kübra",
                Surname = "Başboğa",
                Address = "Kadıköy"
            };

            CustomerManager customerManager = new CustomerManager();

            customerManager.AddCustomer(customer1);
            customerManager.AddCustomer(customer2);

            customerManager.ListCustomer(customer1);
            customerManager.ListCustomer(customer2);

            customerManager.DelCustomer(customer1);
            customerManager.DelCustomer(customer2);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            CustomerManager customerManager = new CustomerManager();

            customerManager.ListCustomers();
            Console.WriteLine();

            customerManager.AddCustomer(new Customer
            {
                Id            = 1,
                FirstName     = "Burak",
                LastName      = "Kosova",
                AccountNumber = "456879731",
                TC            = "19245698764"
            });

            customerManager.AddCustomer(new Customer
            {
                Id            = 2,
                FirstName     = "Kendall",
                LastName      = "Jenner",
                AccountNumber = "456687978",
                TC            = "Not TC citizen"
            });

            customerManager.AddCustomer(new Customer
            {
                Id            = 3,
                FirstName     = "Cem",
                LastName      = "Yılmaz",
                AccountNumber = "442719332",
                TC            = "65478932125"
            });

            customerManager.AddCustomer(new Customer
            {
                Id            = 4,
                FirstName     = "Abel",
                LastName      = "Tesfaye",
                AccountNumber = "78214658",
                TC            = "Not TC citizen"
            });
            Console.WriteLine();

            customerManager.ListCustomers();
            Console.WriteLine();

            customerManager.DeleteCustomer(38);
            Console.WriteLine();

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

            customer1.Id         = 1;
            customer1.Name       = "Keziban";
            customer1.Surname    = "Karabaş";
            customer1.NationalId = "44565659865";

            Customer customer2 = new Customer();

            customer2.Id         = 2;
            customer2.Name       = "Kardelen";
            customer2.Surname    = "Bağdat";
            customer2.NationalId = "57445455";

            Customer customer3 = new Customer();

            customer3.Id         = 3;
            customer3.Name       = "Elif";
            customer3.Surname    = "Ateş";
            customer3.NationalId = "455754542478784";

            Customer customer4 = new Customer();

            customer4.Id         = 4;
            customer4.Name       = "Sevgi";
            customer4.Surname    = "Sancaktutan";
            customer4.NationalId = "754454545";

            Customer customer5 = new Customer();

            customer5.Id         = 5;
            customer5.Name       = "Ayşegül";
            customer5.Surname    = "Deniz";
            customer5.NationalId = "75431846656";

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

            CustomerManager manager = new CustomerManager();

            manager.AddCustomer(customer1);
            manager.AddCustomer(customer2);
            manager.AddCustomer(customer3);
            manager.AddCustomer(customer4);
            manager.AddCustomer(customer5);

            manager.ListCustomer(customers);

            manager.DeleteCustomer(customer4);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id          = 141;
            customer1.Name        = "John";
            customer1.Surname     = "Price";
            customer1.AccountType = "Individual";
            customer1.Balance     = 6541.8;

            Customer customer2 = new Customer();

            customer2.Id          = 142;
            customer2.Name        = "John";
            customer2.Surname     = "MacTavish";
            customer2.AccountType = "Individual";
            customer2.Balance     = 4780;

            Customer customer3 = new Customer();

            customer3.Id          = 143;
            customer3.Name        = "Simon";
            customer3.Surname     = "Riley";
            customer3.AccountType = "Individual";
            customer3.Balance     = 5210;

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

            CustomerManager customerManager = new CustomerManager();

            Console.WriteLine("Listing Sequence is Beginning...");
            customerManager.CustomerList(customers);
            Console.WriteLine("  Listing Completed Successfully.");
            Console.WriteLine("************************************************************");

            Console.WriteLine("Adding Customers...");
            customerManager.AddCustomer(customer1);
            Console.WriteLine("************************************************************");
            customerManager.AddCustomer(customer2);
            Console.WriteLine("************************************************************");
            customerManager.AddCustomer(customer3);
            Console.WriteLine("************************************************************");



            Console.WriteLine("Deleting Customer...");
            customerManager.DeleteCustomer(customer1);
            Console.WriteLine("************************************************************");
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Name    = "Mert";
            customer1.Surname = "Sevingit";
            customer1.Age     = 26;

            Customer customer2 = new Customer();

            customer2.Name    = "Mert2";
            customer2.Surname = "Sevingit2";
            customer2.Age     = 23;

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

            foreach (Customer customer  in customers)
            {
                Console.WriteLine("Customers :" + customer.Name + "-- " + customer.Surname + "-- " + "-- " + customer.Age);
                Console.WriteLine("-----------------------------");
            }

            CustomerManager customerManager = new CustomerManager();

            customerManager.ListCustomers(customer1, customer2);
            customerManager.AddCustomer(customer1);
            customerManager.DeleteCustomer(customer2);
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.CustomerId        = 10;
            customer1.CustomerFirstName = "elçin";
            customer1.CustomerLastName  = "sevim";
            customer1.TelephoneNumber   = 5308994254;

            Customer customer2 = new Customer();

            customer2.CustomerId        = 18;
            customer2.CustomerFirstName = "ayşe";
            customer2.CustomerLastName  = "çakmak";
            customer2.TelephoneNumber   = 5458559894;

            Customer customer3 = new Customer();

            customer3.CustomerId        = 19;
            customer3.CustomerFirstName = "gülçin";
            customer3.CustomerLastName  = "sevim";
            customer3.TelephoneNumber   = 5388998258;

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

            CustomerManager customerManager = new CustomerManager();

            customerManager.AddCustomer(customer1);    //for example is add
            customerManager.DeleteCustomer(customer2); //for example is delete
            customerManager.UpdateCustomer(customer3); //for example is update

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

            customer1.Id           = 001;
            customer1.CustomerName = "Semih";
            customer1.Balance      = 1200;

            Customer customer2 = new Customer();

            customer2.Id           = 002;
            customer2.CustomerName = "Customer2";
            customer2.Balance      = 3000;

            Customer customer3 = new Customer();

            customer3.Id           = 003;
            customer3.CustomerName = "Customer3";
            customer3.Balance      = 1234;

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


            // Getting the customer list.
            for (int i = 0; i < customers.Length; i++)
            {
                Console.WriteLine("Customer Name: " + customers[i].CustomerName + ". " + "Customer ID: " + customers[i].Id + "." + "\n");
            }

            // An alternative way to getting the customer list.
            //foreach (var customer in customers)
            //{
            //    Console.WriteLine("Customer Name: "+customer.CustomerName+". "+"Customer ID: "+customer.Id+"."+"\n");
            //}

            CustomerManager CustomerManager = new CustomerManager();


            Console.WriteLine("--------------------");

            //Add Customer
            CustomerManager.AddCustomer(customer1);
            Console.WriteLine("--------------------");

            //Delete Customer
            CustomerManager.DeleteCustomer(customer2);
            Console.WriteLine("--------------------");

            //List Customer
            CustomerManager.CustomerList(customer3);
        }
Beispiel #8
0
        static void Main(string[] args)
        {
            Customer customer = new Customer();

            customer.Name       = "Mushvig";
            customer.Sname      = "Guluzada";
            customer.CustomerId = 1211111;

            CustomerManager customerManager = new CustomerManager();

            customerManager.AddCustomer(customer);
            customerManager.DeleteCustomer(customer);
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id            = 1;
            customer1.FirstName     = "Ahsen";
            customer1.LastName      = "Çelen";
            customer1.AccountNumber = 123456789;

            Customer customer2 = new Customer();

            customer2.Id            = 2;
            customer2.FirstName     = "Engin";
            customer2.LastName      = "Demiroğ";
            customer2.AccountNumber = 987654321;

            Customer customer3 = new Customer();

            customer3.Id            = 3;
            customer3.FirstName     = "Alara";
            customer3.LastName      = "Cesur";
            customer3.AccountNumber = 456123789;


            Customer[]      customers       = new Customer[] { customer1, customer2, customer3 };
            CustomerManager customerManager = new CustomerManager();

            foreach (Customer customer in customers)
            {
                customerManager.AddCustomer(customer);
            }
            Console.WriteLine("--------------------");
            Console.WriteLine("Lütfen, silmek istediğiniz kişinin Id'sini giriniz.");
            int deleteId = Convert.ToInt32(Console.ReadLine());

            foreach (Customer customer in customers)
            {
                if (customer.Id == deleteId)
                {
                    customerManager.DeleteCumstomer(customer);
                    break;
                }
            }
            Console.WriteLine("----------------------");
            Console.WriteLine("Müşteriler Listelendi");
            foreach (Customer customer in customers)
            {
                customerManager.ListCustomer(customer);
            }
        }
Beispiel #10
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.FirstName  = "Ali";
            customer1.LastName   = "Veli";
            customer1.CustomerId = 1;
            customer1.Balance    = 1923;

            Customer customer2 = new Customer()
            {
                FirstName = "Ayşe", LastName = "Zeynep", Balance = 1990, CustomerId = 2
            };

            CustomerManager musteriYoneticisi = new CustomerManager();

            musteriYoneticisi.AddCustomer(customer1);
            musteriYoneticisi.DeleteCustomer(customer2);

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

            customer1.Id      = 1;
            customer1.Name    = "Bilal";
            customer1.Surname = "Dırmık";
            customer1.Phone   = "05332109876";
            customer1.Mail    = "*****@*****.**";

            Customer customer2 = new Customer();

            customer2.Id      = 2;
            customer2.Name    = "Hikmet";
            customer2.Surname = "Dırmık";
            customer2.Phone   = "01234567890";
            customer2.Mail    = "*****@*****.**";

            Customer customer3 = new Customer();

            customer3.Id      = 3;
            customer3.Name    = "Engin";
            customer3.Surname = "Dermiroğ";
            customer3.Phone   = "01928374656";
            customer3.Mail    = "*****@*****.**";

            Customer[]      customers = new Customer[] { customer1, customer2, customer3 };
            CustomerManager manager   = new CustomerManager();

            Console.WriteLine("---------------------------------------------------------------------");
            manager.AddCustomer(customer1);
            Console.WriteLine("---------------------------------------------------------------------");
            manager.DelCustomer(customer2);
            Console.WriteLine("---------------------------Müşteri Listesi---------------------------");
            for (int i = 0; i < customers.Length; i++)
            {
                manager.ListCustomer(customers[i]);
                Console.WriteLine("-------------------------------");
            }
        }
Beispiel #12
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id      = 12;
            customer1.Name    = "Nur";
            customer1.Surname = "Ozcan";
            customer1.Age     = 26;

            Customer customer2 = new Customer();

            customer2.Id      = 4;
            customer2.Name    = "Anıl";
            customer2.Surname = "Ozcan";
            customer2.Age     = 23;

            CustomerManager customerManager = new CustomerManager();

            customerManager.AddCustomer(customer1);
            customerManager.DeleteCustomer(customer2);
            customerManager.ListCustomers(customer2);
        }
Beispiel #13
0
        static void Main(string[] args)
        {
            Console.WriteLine("~~~~Welcome to the system~~~~");


            Customer c1 = new Customer();

            c1.CustomerID           = 2001;
            c1.CustomerName         = "Chandler Bing";
            c1.ProductName          = "Pinball Table";
            c1.CustomerBudget       = 300;
            c1.SuggestedProductCost = 450;

            Customer c2 = new Customer();

            c2.CustomerID           = 2002;
            c2.CustomerName         = "Monica Geller";
            c2.ProductName          = "Eyelash Curler";
            c2.CustomerBudget       = 150;
            c2.SuggestedProductCost = 120;

            Customer c3 = new Customer();

            c3.CustomerID           = 2003;
            c3.CustomerName         = "Joey Tribbiani";
            c3.ProductName          = "Duck";
            c3.CustomerBudget       = 20;
            c3.SuggestedProductCost = 15;

            Customer c4 = new Customer();

            c4.CustomerID           = 2004;
            c4.CustomerName         = "Phoebe Buffay";
            c4.ProductName          = "Guitar";
            c4.CustomerBudget       = 500;
            c1.SuggestedProductCost = 499;

            Customer c5 = new Customer();

            c5.CustomerID           = 2005;
            c5.CustomerName         = "Rachel Green";
            c5.ProductName          = "Fur";
            c5.CustomerBudget       = 600;
            c5.SuggestedProductCost = 1000;

            Customer c6 = new Customer();

            c6.CustomerID           = 2006;
            c6.CustomerName         = "Ross Geller";
            c6.ProductName          = "Dinosaur model";
            c6.CustomerBudget       = 900;
            c6.SuggestedProductCost = 850;

            Customer[] customers = new Customer[] { c1, c2, c3, c4, c5, c6 };

            Console.WriteLine();
            Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~Methods~~~~~~~~~~~~~~~~~~~~~~~");

            //instance
            Console.WriteLine();
            CustomerManager CManager = new CustomerManager();

            CManager.AddCustomer(c1);
            CManager.AddCustomer(c2);
            CManager.AddCustomer(c3);
            CManager.AddCustomer(c4);
            CManager.AddCustomer(c5);
            Console.WriteLine();
            Console.Write("Deletion Method : ");
            CManager.DeleteCustomer(c6);
            Console.WriteLine();

            CManager.ListCustomers(customers);
        }