예제 #1
0
        public static void Add()
        {
            Account     a  = new Account();
            AccountCrud ac = new AccountCrud();

            a.acno = ac.Generate();

            Console.WriteLine("Enter First Name ");
            a.fname = Console.ReadLine();
            Console.WriteLine("Enter Last Name ");
            a.lname = Console.ReadLine();
            Console.WriteLine("Enter City ");
            a.city = Console.ReadLine();
            Console.WriteLine("Enter state ");
            a.state = Console.ReadLine();

            a.date = "";
            Console.WriteLine("Enter Amount");
            a.amount = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter Cheque Facility ");
            a.cheq = Console.ReadLine();
            Console.WriteLine("Enter Account type ");
            a.actype = Console.ReadLine();


            a.status = "true";

            Console.WriteLine(ac.AddAccount(a));
        }
예제 #2
0
        public static void CloseAccount()
        {
            int acno;

            Console.WriteLine("enter account number");
            acno = Convert.ToInt32(Console.ReadLine());
            AccountCrud obj = new AccountCrud();

            Console.WriteLine(obj.Close(acno));
        }
예제 #3
0
        public static void Withdraw()
        {
            AccountCrud ac = new AccountCrud();
            int         n, amount;

            Console.WriteLine("Enter accountno");
            n = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter withdrawAMount");
            amount = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine(ac.WithdrawAccount(n, amount));
        }
예제 #4
0
        public static void DepositAccount()
        {
            AccountCrud ac = new AccountCrud();
            int         n, amount;

            Console.WriteLine("Enter accountno");
            n = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter deposit ammount");
            amount = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine(ac.depositaccount(n, amount));
        }
예제 #5
0
        public static void Show()
        {
            AccountCrud ac = new AccountCrud();

            Account[] ar = ac.ShowAccount();
            foreach (Account a in ar)
            {
                Console.WriteLine(a);
                Console.WriteLine("--------------------------------");
            }
        }
예제 #6
0
        public static void Search()
        {
            Console.WriteLine("Enter accountno");
            int         n = Convert.ToInt32(Console.ReadLine());
            string      firstname, lastname, city, state, cheqfacil, accounttype;
            int         amount;
            AccountCrud ac = new AccountCrud();

            ac.SearchAccount(n, out firstname, out lastname, out city, out state, out amount, out cheqfacil, out accounttype);
            Console.WriteLine("Firstname : " + firstname);
            Console.WriteLine("Lastname : " + lastname);
            Console.WriteLine("City : " + city);
            Console.WriteLine("State : " + state);
            Console.WriteLine("Amount : " + amount);
            Console.WriteLine("Ceqfacil : " + cheqfacil);
            Console.WriteLine("Accounttype : " + accounttype);
        }