static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.CustomerName = "Bensu"; customer1.CustomerSurname = "Derin"; Customer customer2 = new Customer(); customer2.Id = 2; customer2.CustomerName = "Ayşe"; customer2.CustomerSurname = "Güneş"; Customer customer3 = new Customer(); customer3.Id = 3; customer3.CustomerName = "Burak"; customer3.CustomerSurname = "Deniz"; Customer[] customers = new Customer[] { customer1, customer2, customer3 }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Add(customer2); customerManager.Add(customer3); Console.WriteLine("----------------"); customerManager.Delete(customer1); Console.WriteLine("----------------"); customerManager.List(customers); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.CustomerId = 123; customer1.CustomerName = "Emine"; customer1.CustomerLastName = "Özbek"; customer1.CustomerPhoneNumber = "05987654321"; Customer customer2 = new Customer(); customer2.CustomerId = 456; customer2.CustomerName = "Fatma"; customer2.CustomerLastName = "Uzun"; customer2.CustomerPhoneNumber = "05987654320"; Customer customer3 = new Customer(); customer3.CustomerId = 789; customer3.CustomerName = "Ali"; customer3.CustomerLastName = "Osman"; customer3.CustomerPhoneNumber = "05123456789"; Customer[] customers = new Customer[] { customer1, customer2, customer3 }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.List(customers); customerManager.Delete(customer3); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.Name = "Asrın"; customer1.Surname = "Asır"; customer1.AccountType = "investment"; customer1.MomSurname = "A"; Customer customer2 = new Customer(); customer2.Id = 2; customer2.Name = "Akman"; customer2.Surname = "Arıkan"; customer2.AccountType = "investment"; customer2.MomSurname = "B"; Customer[] customers = new Customer[] { customer1, customer2 }; foreach (Customer customer in customers) { } CustomerManager customerManager = new CustomerManager(); customerManager.Add("Salih", "Hacı", 3, "student", "C"); Console.WriteLine("*******************"); customerManager.Delete(customer2); Console.WriteLine("*******************"); customerManager.List(customer1); }
static void Main(string[] args) { Customer customer = new Customer(); customer.Id = 1; customer.TcNo = "11111111111"; customer.customerName = "Ömer Faruk"; customer.customerLname = "Kanlı"; customer.City = "İstanbul"; customer.Town = "Pendik"; Customer customer1 = new Customer(); customer1.Id = 2; customer1.TcNo = "22222222222"; customer1.customerName = "Mehmet"; customer1.customerLname = "Kanlı"; customer1.City = "İstnabul"; customer1.Town = "Pendik"; CustomerManager customerManager = new CustomerManager(); Customer[] customers = new Customer[] { customer, customer1 }; customerManager.Add(customer); customerManager.Delete(customer1); customerManager.Update(customer); customerManager.List(customers); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Name = "Şule"; customer1.Surname = "Kaptan"; customer1.Age = 21; Customer customer2 = new Customer(); customer2.Name = "Şevval"; customer2.Surname = "Arslan"; customer2.Age = 20; Customer[] customers = new Customer[] { customer1, customer2 }; /*foreach (Customer cust in customers) * { * Console.WriteLine(cust.Name); * Console.WriteLine(cust.Surname); * Console.WriteLine(cust.Age); * }*/ CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Add(customer2); Console.WriteLine("-----------------------------------"); customerManager.List(customer1); customerManager.List(customer2); Console.WriteLine("-----------------------------------"); customerManager.Delete(customer2); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(new Customer { id = 1, Name = "burak" }); customerManager.Add(new Customer { id = 2, Name = "ibrahim" }); customerManager.List(); customerManager.Delete(new Customer { id = 2, Name = "ibrahim" }); customerManager.List(); Console.ReadLine(); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 001; customer1.Name = "Doğukan"; customer1.SurName = "Doğu"; Customer customer2 = new Customer(); customer2.Id = 002; customer2.Name = "Ali İhsan"; customer2.SurName = "Çalıkuşu"; Customer customer3 = new Customer(); customer3.Id = 003; customer3.Name = "Burkay"; customer3.SurName = "Ağgül"; Customer customer4 = new Customer(); customer4.Id = 004; customer4.Name = "Fikri"; customer4.SurName = "Tabar"; Customer[] customers = new Customer[] { customer1, customer2, customer3, customer4 }; CustomerManager customerManager = new CustomerManager(); Console.WriteLine("//Listed Method"); customerManager.List(customers); Console.WriteLine("--------------"); Console.WriteLine("//Added Method"); customerManager.Add(customer1); Console.WriteLine("----------------------------"); Console.WriteLine("//Updated Method"); customerManager.Update(customer2); Console.WriteLine("------------------------------------------"); Console.WriteLine("//Deleted Method"); customerManager.Delete(customer3); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 01; customer1.Tc = "11111111111"; customer1.Name = "Sezer"; customer1.LastName = "Yılmaz"; customer1.City = "Edirne"; Customer customer2 = new Customer(); customer2.Id = 02; customer2.Tc = "22222222222"; customer2.Name = "Metin"; customer2.LastName = "Yılmaz"; customer2.City = "Trabzon"; Customer customer3 = new Customer(); customer3.Id = 03; customer3.Tc = "33333333333"; customer3.Name = "Celal"; customer3.LastName = "Güner"; customer3.City = "Ankara"; CustomerManager customerManager = new CustomerManager(); Customer[] customers = new Customer[] { customer1, customer2, customer3 }; customerManager.Add(customer1); customerManager.Delete(customer2); customerManager.List(customer3); Console.WriteLine(""); foreach (var c in customers) { Console.WriteLine(c.Id + " " + c.Name + " " + c.LastName + " " + c.City); } }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.FirstName = "Ahmet"; customer1.LastName = "Kara"; customer1.Phone = 12346789; customer1.Address = "İstanbul"; customer1.Balance = 0; Customer customer2 = new Customer(); customer2.Id = 2; customer2.FirstName = "Mehmet"; customer2.LastName = "Yara"; customer2.Phone = 987654321; customer2.Address = "İzmir"; customer2.Balance = 0; Customer customer3 = new Customer(); customer3.Id = 3; customer3.FirstName = "Ayşe"; customer3.LastName = "Cura"; customer3.Phone = 147258369; customer3.Address = "Ankara"; customer3.Balance = 0; Customer[] customer = new Customer[] { customer1, customer2, customer3 }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Add(customer2); customerManager.Add(customer3); customerManager.Delete(customer3); customerManager.List(customer); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.Name = "Ted"; customer1.Surname = "Mosby"; Customer customer2 = new Customer(); customer2.Id = 2; customer2.Name = "Barney"; customer2.Surname = "Stinson"; Customer customer3 = new Customer(); customer3.Id = 3; customer3.Name = "Lily"; customer3.Surname = "Aldrin"; Customer customer4 = new Customer(); customer4.Id = 4; customer4.Name = "Robin"; customer4.Surname = "Scherbatsky"; List <Customer> customerList = new List <Customer> { customer1, customer2, customer3, customer4 }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Delete(customer2); customerManager.List(customerList); Console.ReadLine(); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = "255"; customer1.CustomerName = "Mehmet"; customer1.CustomerSurname = "Topal"; Customer customer2 = new Customer(); customer2.Id = "256"; customer2.CustomerName = "ÖmerFaruk"; customer2.CustomerSurname = "Topal"; Customer customer3 = new Customer(); customer3.Id = "257"; customer3.CustomerName = "Can"; customer3.CustomerSurname = "Capkan"; Customer[] customers = new Customer[] { customer1, customer2, customer3 }; CustomerManager customermanager = new CustomerManager(); customermanager.Add(customer1); customermanager.List(customers); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.CustomerName = "Anday"; customer1.CustomerSurname = "Aktaş"; customer1.CustomerId = 1; customer1.Money = 80000; Customer customer2 = new Customer(); customer2.CustomerName = "Begüm"; customer2.CustomerSurname = "Güner"; customer2.CustomerId = 2; customer2.Money = 35000; Customer[] customers = new Customer[] { customer1, customer2 }; CustomerManager customerManager = new CustomerManager(); int Id; while (true) { Console.WriteLine("Eklemek istediğiniz müşterinin Id numarasını giriniz(0=Exit): "); Id = Convert.ToInt32(Console.ReadLine()); if (Id == 0) { break; } else { foreach (Customer customer in customers) { if (customer.CustomerId == Id) { customerManager.Add(customer); } else { continue; } } } } Console.WriteLine("Silmek istediğiniz müşterinin Id numarasını giriniz: "); Id = Convert.ToInt32(Console.ReadLine()); foreach (Customer customer in customers) { if (customer.CustomerId == Id) { customerManager.Delete(customer); } else { continue; } } customerManager.BankRate(); Console.WriteLine("\n----------------Müşteri Listesi---------------"); customerManager.List(); }
static void Main(string[] args) { bool run = true; bool firstRun = true; bool secondRun = true; Console.WriteLine("\tWelcome to the Bank "); while (run) { try { CustomerManager cm = new CustomerManager(); while (firstRun) { Console.Write("1 Add customer\n2 Delete customer\n3 List customers' information \n4 Exit \nSelect the action you want to carry out: "); int choose = Convert.ToInt32(Console.ReadLine()); switch (choose) { case 1: while (secondRun) { Console.Write("Enter the number of customers to add: "); try { int count = Convert.ToInt32(Console.ReadLine()); for (int i = 1; i <= count; i++) { Customer customer = new Customer(); Console.Write("\nPlease write your name: "); customer.CustomerName = Console.ReadLine(); Console.Write("Please write your surname: "); customer.CustomerSurname = Console.ReadLine(); Console.Write("Please write your age: "); customer.CustomerAge = Convert.ToInt32(Console.ReadLine()); cm.Add(customer); secondRun = false; } } catch (Exception) { Console.WriteLine("\n***You entered the wrong format! \n"); } } break; case 2: Customer deleteCustomer = new Customer(); Console.Write("\nPlease write your name: "); deleteCustomer.CustomerName = Console.ReadLine(); Console.Write("Please write your surname: "); deleteCustomer.CustomerSurname = Console.ReadLine(); cm.Delete(deleteCustomer); break; case 3: cm.List(); break; case 4: firstRun = false; Console.WriteLine("\nHave a nice day"); break; default: Console.WriteLine("\nYou did not choose one of these options !!!\n "); break; } } run = false; } catch { Console.WriteLine("\n***You entered the wrong format!\n"); } } }
static void Main(string[] args) { Customers customer1 = new Customers(); customer1.Id = 220391; customer1.Name = "Melek Nur Gül"; customer1.KimlikNo = 34154785139; customer1.City = "Edirne"; Customers customer2 = new Customers(); customer2.Id = 280912; customer2.Name = "Ali Konar"; customer2.KimlikNo = 74185296315; customer2.City = "Giresun"; Customers customer3 = new Customers(); customer3.Id = 140285; customer3.Name = "Nursel Konar"; customer3.KimlikNo = 84125741254; customer3.City = "Bolu"; Customers customer4 = new Customers(); customer4.Id = 280281; customer4.Name = "Kenan Konar"; customer4.KimlikNo = 95175345841; customer4.City = "Giresun"; Customers customer5 = new Customers(); customer5.Id = 610610; customer5.Name = "Ali Furkan Zehir"; customer5.KimlikNo = 65414785423; customer5.City = "Trabzon"; Customers customer6 = new Customers(); customer6.Id = 510512; customer6.Name = "Meyra Sare Özata"; customer6.KimlikNo = 51515151519; customer6.City = "Niğde"; Customers[] musteriler = new Customers[] { customer1, customer2, customer3, customer4 }; //foreach (Customers customers in musteriler) //{ // Console.WriteLine(customers.Id); // Console.WriteLine(customers.Name); // Console.WriteLine(customers.KimlikNo); // Console.WriteLine(customers.City); //} CustomerManager Manegment = new CustomerManager(); Manegment.List(musteriler); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine("________________"); Manegment.Add(customer5); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine("________________"); Manegment.Remove(customer6); }