Example #1
0
        public void displaybalance()
        {
            ATMbo  dpb = new ATMbo();
            ATMbll bll = new ATMbll();

            bll.displaybal(dpb);
        }
Example #2
0
        public void deleteaccount()
        {
            Console.WriteLine("Enter Account no which you want to be deleted");
            int   i    = System.Convert.ToInt32(Console.ReadLine());
            ATMbo bdel = new ATMbo {
                ac_no = i
            };
            ATMbll bll = new ATMbll();

            bll.deleteacc(bdel);
        }
Example #3
0
        public void deposit()
        {
            Console.WriteLine("Please Enter depossit amounnt");
            int   i    = System.Convert.ToInt32(Console.ReadLine());
            ATMbo bdep = new ATMbo {
                dep = i
            };
            ATMbll bll = new ATMbll();

            bll.saveDeposit(bdep);
        }
Example #4
0
        public void Normal()
        {
            Console.Clear();
            Console.WriteLine("Enter the amount you want to withdraw");
            int   i   = System.Convert.ToInt32(Console.ReadLine());
            ATMbo Nbl = new ATMbo {
                dep = i
            };
            ATMbll bll = new ATMbll();

            bll.fastbal(Nbl);
        }
Example #5
0
        public void fastcash()
        {
            Console.Clear();
            Console.WriteLine("Select the Amount");
            Console.WriteLine("1_500");
            Console.WriteLine("2_1000");
            Console.WriteLine("3_2000");
            Console.WriteLine("4_5000");
            Console.WriteLine("5_10000");
            Console.WriteLine("6_20000");
            int i = System.Convert.ToInt32(Console.ReadLine());
            int b;

            for (int j = 0; j < 1; j++)
            {
                if (i == 1)
                {
                    b = 500;
                }
                else if (i == 2)
                {
                    b = 1000;
                }
                else if (i == 3)
                {
                    b = 2000;
                }
                else if (i == 4)
                {
                    b = 5000;
                }
                else if (i == 5)
                {
                    b = 10000;
                }
                else if (i == 6)
                {
                    b = 20000;
                }
                else
                {
                    Console.WriteLine("Wrong input");
                }
            }
            ATMbo fbl = new ATMbo {
                dep = i
            };
            ATMbll bll = new ATMbll();

            bll.fastbal(fbl);
        }
Example #6
0
        public void viewReports()
        {
            ATMbll bll = new ATMbll();

            bll.viewReports();
        }
Example #7
0
        public void Create()
        {
            bool c = false;

            Console.WriteLine("For creating account fill the Following");
            Console.WriteLine("Enter Username");
            string username = Console.ReadLine();

            Console.WriteLine(" Enter pin");
            int i = System.Convert.ToInt32(Console.ReadLine());


            Console.WriteLine("Enter status");
            string stat = Console.ReadLine();

            for (int i1 = 0; i1 < stat.Length; i1++)
            {
                if (stat[i1] >= 'a' && stat[i1] <= 'z' || stat[i1] >= 'A' && stat[i1] <= 'Z' || stat[i1] == ' ')
                {
                    c = true;
                }
                else
                {
                    c = false;
                }
            }


            Console.WriteLine(" Enter balance");
            int b = System.Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(" Enter account no");
            int ac = System.Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Enter Holder name");
            string name = Console.ReadLine();

            for (int i1 = 0; i1 < name.Length; i1++)
            {
                if (name[i1] >= 'a' && name[i1] <= 'z' || name[i1] >= 'A' && name[i1] <= 'Z' || name[i1] == ' ')
                {
                    c = true;
                }
                else
                {
                    c = false;
                }
            }

            if (c == false)
            {
                Console.WriteLine("Enter Valid Name");
                name = Console.ReadLine();
            }



            ATMbo bcre = new ATMbo {
                user = username, pin1 = i, status = stat, balance = b, ac_no = ac, holder = name
            };
            ATMbll bll = new ATMbll();

            bll.CreateAccount(bcre, "ATM.csv");
        }