static void Main(string[] args) { BankCard bankCard1 = new BankCard { BankName = "Bir Bank", UserName = "******", PIN = "1234", PAN = "321245", CVC = "343", ExpireTime = new DateTime(2023, 12, 10), Balance = 12340 }; Client c1 = new Client { Name = "Obama", Surname = "Obamali", Age = 45, Id = 1, Salary = 1200 }; Client c2 = new Client { Name = "Nizami", Surname = "Nizamili", Age = 35, Id = 2, Salary = 2100 }; Client c3 = new Client { Name = "John", Surname = "Johnoglu", Age = 25, Id = 12, Salary = 4500 }; Bank bank = new Bank { }; bank.addClients(ref c1); bank.addClients(ref c2); bank.addClients(ref c3); bank.ShowClients(); bank.ShowCardBalance(bankCard1); }
public void ShowCardBalance(BankCard BankCard) { try { if (Hepler.CheckPAN(BankCard.PAN)) { if (Hepler.CheckExpireTime(BankCard.ExpireTime)) { if (Hepler.CheckBalance(BankCard.Balance)) { bankCard.ShowBalance(); } } } } catch (Exception ex) { Console.WriteLine(ex.Message); } }