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); }
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); }
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); } }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.FirstName = "Cem"; customer1.LastName = "Yılmaz"; customer1.PhoneNumber = "0555 111 11 11"; customer1.CreditCardNumber = "4444-5555-****-****"; Customer customer2 = new Customer(); customer2.Id = 2; customer2.FirstName = "Furkan"; customer2.LastName = "Yılmaz"; customer2.PhoneNumber = "0555 222 22 22"; customer2.CreditCardNumber = "3333-4444-****-****"; Customer customer3 = new Customer(); customer3.Id = 3; customer3.FirstName = "Yılmaz"; customer3.LastName = "Erdoğan"; customer3.PhoneNumber = "0555 333 33 33"; customer3.CreditCardNumber = "5555-8888-****-****"; Customer customer4 = new Customer(); customer4.Id = 4; customer4.FirstName = "Ali"; customer4.LastName = "Erdoğan"; customer4.PhoneNumber = "0555 444 44 44"; customer4.CreditCardNumber = "5454-8181-****-****"; List <Customer> customers = new List <Customer> { customer1, customer2, customer3, customer4 }; CustomerManager customerManager = new CustomerManager(); //customerManager.AddCustomer(ref customers); customerManager.DeleteCustomer(ref customers, 0); customerManager.ListCustomer(ref customers); }
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("-------------------------------"); } }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.Name = "Yasir"; customer1.LastName = "Demirci"; customer1.CardNumber = 1000001; Customer customer2 = new Customer(); customer2.Id = 1; customer2.Name = "Malik"; customer2.LastName = "Demirci"; customer2.CardNumber = 1000002; Customer customer3 = new Customer(); customer3.Id = 1; customer3.Name = "Ahmet Arif"; customer3.LastName = "Demirci"; customer3.CardNumber = 1000003; Customer customer4 = new Customer(); customer4.Id = 1; customer4.Name = "Yunus Emre"; customer4.LastName = "Demirci"; customer4.CardNumber = 1000004; //------------------------------- //------------------------------- CustomerManager customerManager = new CustomerManager(); customerManager.CustomerAdd(customer1); Console.WriteLine("\n"); customerManager.ListCustomer(customer1); Console.WriteLine("-----------------------------------------------"); customerManager.CustomerAdd(customer2); Console.WriteLine("\n"); customerManager.ListCustomer(customer2); Console.WriteLine("-----------------------------------------------"); customerManager.CustomerAdd(customer3); Console.WriteLine("\n"); customerManager.ListCustomer(customer3); Console.WriteLine("-----------------------------------------------"); customerManager.CustomerAdd(customer4); Console.WriteLine("\n"); customerManager.ListCustomer(customer4); Console.WriteLine("-----------------------------------------------"); Console.WriteLine("-----------------------------------------------------------------------------------------"); customerManager.CustomerDelete(customer1); Console.WriteLine("\n"); customerManager.CustomerDelete(customer2); Console.WriteLine("\n"); customerManager.CustomerDelete(customer3); Console.WriteLine("\n"); customerManager.CustomerDelete(customer4); }