Beispiel #1
0
        public void SignUp()
        {
            //Console.Clear();
            Console.WriteLine("**** Banking System | Signup Page ****\n");
            Console.Write("{0}", "Your First Name          : ");
            User.FName = Console.ReadLine();
            Console.Write("{0}", "Your Last Name          : ");
            User.LName = Console.ReadLine();
            Console.Write("{0}", "Your gender[M/F]        : ");
            char Gender = Console.ReadLine()[0];

            User.Title = (Gender == 'M' || Gender == 'm') ? "Mr" : "Ms";
            Console.Write("{0}", "Enter Your Phone Number  : ");
            User.Phone_Number = Int64.Parse(Console.ReadLine());
            Console.Write("{0}", "Address  : ");
            User.Address = Console.ReadLine();
            Console.Write("{0}", "Password[max 21 chars]  : ");
            User.Password = Console.ReadLine();
            Console.Write("{0}", "Enter amount to deposit : ");
            User.Total_Balance = UInt64.Parse(Console.ReadLine());
            Double T_Balance = User.Total_Balance;

            //Console.BackgroundColor = ConsoleColor.DarkBlue;
            Console.WriteLine("\n");
            Console.WriteLine("|{0}|", "Thanks for banking with us | Your generated account number is " + User.GenerateAccountNumber());
            User.WriteToDatabase(2);
            User.UpdatePassbook(User.Account_Number, T_Balance, "First Deposit");
            //Console.WriteLine("\n");
            Console.BackgroundColor = ConsoleColor.Black;
            Console.WriteLine("Please note down your account number and password!");
            Console.ReadLine();
        }
Beispiel #2
0
 public void Logout()
 {
     User.WriteToDatabase(3);
     Console.WriteLine("\n");
     Console.WriteLine("Thanks for using our service!");
     Console.WriteLine("You have been successfully logged out!");
     Console.WriteLine("Press any key to go back to the main menu!");
 }