コード例 #1
0
 public void AddClient()
 {
     try
     {
         Console.WriteLine("Write name of client:");
         string name = Console.ReadLine();
         Console.WriteLine("Write surname of client:");
         string surname = Console.ReadLine();
         Console.WriteLine("Write what type of realty you need:");
         string typeOfRealty = Console.ReadLine();
         Console.WriteLine("Write cost of realty you need:");
         int costOfRealty = Convert.ToInt32(Console.ReadLine());
         Console.WriteLine("Write client's bank account:");
         int    bankAccount = Convert.ToInt32(Console.ReadLine());
         Client client      = new Client(name, surname, typeOfRealty, costOfRealty, bankAccount);
         regularExpressions.CheckClients(client);
         clientManagement.Add(client);
     }
     catch
     {
         Console.WriteLine("Incorrect input!!!");
         Console.WriteLine("Try again");
     }
 }
コード例 #2
0
 public void CreateObjects()
 {
     clientManagement.Add(client1);
     clientManagement.Add(client2);
     clientManagement.Add(client3);
 }