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); }
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(); }
static void Main(string[] args) { Customer customer = new Customer() { Id = 1, Name = "Tuğçe Asena", LastName = "T.", Email = "*****@*****.**", PhoneNumber = "+90 234 623 42 21", Title = "Mrs. " }; Customer customer1 = new Customer() { Id = 2, Name = "Gökhan", LastName = "Şarapevi", Email = "*****@*****.**", PhoneNumber = "+90 234 573 45 45", Title = "Mr. " }; Customer customer2 = new Customer() { Id = 3, Name = "Furkan", LastName = "G.", Email = "*****@*****.**", PhoneNumber = "+90 345 346 34 35", Title = "Mr. " }; Customer customer3 = new Customer() { Id = 4, Name = "Baha", LastName = "Ö.", Email = "*****@*****.**", PhoneNumber = "+90 325 234 62 12", Title = "Mr. " }; List <Customer> customers = new List <Customer> { customer, customer1, customer2, customer3 }; CustomerManager customerManager = new CustomerManager(); Console.WriteLine("**-*-** In order to start the app press 'Enter' **-*-**"); Console.WriteLine("**-*-** Keep pressing 'Enter' after each action takes place. **-*-**"); Console.ReadKey(); Console.WriteLine("**-*-** Customer Creation. **-*-**"); customerManager.Add(customer); Console.WriteLine("**-*-** Customer Removal. **-*-**"); customerManager.DeleteCustomer(customer1); Console.WriteLine("**-*-** Listing Customers. **-*-**"); customerManager.ListCustomers(customers); }
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); }
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(); }
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); }
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 = 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("************************************************************"); }
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.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(); }
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); }
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); }