public static void SpendMoney(Client client) { int choise = ConsoleWriteAndRead.ChoiseCard(client); if (choise == 0) { return; } int howMoney = ConsoleWriteAndRead.WriteYourChoise(1, 1000, message: "Введите сумму: "); ConsoleWriteAndRead.MessageAboutSpendMoney(client.ClientCards[choise - 1].BankOfCard.PossibilityToUse(client.ClientCards[choise - 1], howMoney)); }
public static void AddCashOnCard(Client client) { int choise = ConsoleWriteAndRead.ChoiseCard(client); //Выбор карты if (choise == 0) { return; } ConsoleWriteAndRead.YourBalance(client); //Вывод баланса int howMoney = ConsoleWriteAndRead.WriteYourChoise(1, (int)client.Money, message: "Введите сумму: "); //Ввод суммы от 1 до balance client.ClientCards[choise - 1].CardBalance += howMoney; client.Money -= howMoney; }
public void DeleteCard() //Удаление карточки { int choise = ConsoleWriteAndRead.ChoiseCard(this); //Вывод списка карт и выбор необходимой if (choise == 0) { return; } else if (ClientCards[choise - 1].CardBalance < 0) //Если отрицательный баланс { ConsoleWriteAndRead.NegativeBalance(this); } else { ClientCards.RemoveAt(choise - 1); } }