Exemplo n.º 1
0
        static TermDepositAccount FindTermDeposit(int accNum)
        {
            TermDepositAccount account = null;

            foreach (var acc in SelectedCustomer.TDC)
            {
                if (acc.AccountNum == accNum && acc.IsActive)
                {
                    account = acc;
                }
            }
            return(account);
        }
Exemplo n.º 2
0
        static void OpenTermDeposit()
        {
            double depositAmt     = 1000;
            double interestRate   = 0.0125;
            int    durationMonths = 12;
            var    depositAccount = new TermDepositAccount(depositAmt, interestRate, durationMonths)
            {
                Customer_Id = SelectedCustomer.Id,
                Customer    = SelectedCustomer
            };

            SelectedCustomer.TDC.Add(depositAccount);
            Console.WriteLine(CongratulationNewAccount(depositAccount.AccountNum));
        }
Exemplo n.º 3
0
 static void TransInTDC(TermDepositAccount account)
 {
     if (account != null)
     {
         Console.WriteLine("\n   Account Found!\n Available Funds: $" + account.Balance);
         if (CompareTwoDates(DateTime.Now, account.MaturityDate) == -1)
         {
             Console.WriteLine("\n\tCannot make any transaction.\n\tMaturity date is: " + account.MaturityDate.ToString());
         }
         else
         {
             Console.WriteLine("\n\tYour TDC (Term Deposit Certificate) has Matured on: " + account.MaturityDate.ToString());
             Console.WriteLine("You can Close and Transfer the funds in another account or Withdraw in Cash");
         }
         return;
     }
     else
     {
         Console.WriteLine("\n\tNo Term Deposit Certificate Account found");
     }
 }