Exemplo n.º 1
0
        private static void accountInsert()
        {
            Console.WriteLine("Insert new account");

            Console.Write("Enter 1 for Legal Person or 2 for Natural Person: ");
            int enterAccountType = int.Parse(Console.ReadLine());

            Console.Write("Enter Customer Name: ");
            string enterName = Console.ReadLine();

            Console.Write("Enter the opening balance: ");
            double enterBalance = double.Parse(Console.ReadLine());

            Console.Write("Enter credit value: ");
            double enterCredit = double.Parse(Console.ReadLine());

            account newAccount = new account(typeaccount: (Typeaccount)enterAccountType,
                                             balance: enterBalance,
                                             credit: enterCredit,
                                             name: enterName);

            accountList.Add(newAccount);
        }