Exemple #1
0
 public static void putMoney(Client client, List <Client> lstClients)
 {
     Console.WriteLine("Podaj kwotę do wpłaty");
     client.accountBalance += Double.Parse(Console.ReadLine());
     client.accountBalance  = Math.Round(client.accountBalance, 2);
     CheckState(client);
     lstClients[clientIndex] = client;
     ClientDB.SaveList(lstClients);
 }
Exemple #2
0
        public static void getMoney(Client client, List <Client> lstClients)
        {
            double getBackMoney;

            Console.WriteLine("Podaj kwotę do wypłaty");
            getBackMoney = Double.Parse(Console.ReadLine());
            if (getBackMoney < client.accountBalance)
            {
                client.accountBalance -= getBackMoney;
                client.accountBalance  = Math.Round(client.accountBalance, 2);
                CheckState(client);
                lstClients[clientIndex] = client;
                ClientDB.SaveList(lstClients);
            }
            else
            {
                Console.WriteLine("Brak odpowiednich środków do wykonania transakcji");
            }
        }