示例#1
0
 private void AccountInput(out int id, out String name, out int balance)
 {
     Console.WriteLine("개좌 개설 ------");
     id      = WbGlobal.InputInt("개좌  ID");
     name    = WbGlobal.InputString("이    름");
     balance = WbGlobal.InputInt("입 금 액");
 }
示例#2
0
        static void Main(String[] args)
        {
            AccManager manager = new AccManager();

            while (true)
            {
                Console.Clear();  //system("cls")

                manager.PrintMenu();
                int choice = WbGlobal.InputInt("선택");
                switch (IdxToMenu(choice))
                {
                case menu.MAKE: manager.MakeAccount(); break;

                case menu.DEPOSIT: manager.Depoist(); break;

                case menu.WITHDRAW: manager.Withdraw(); break;

                case menu.INQUIRE: manager.Inquire(); break;

                case menu.EXIT: return;

                default:
                    Console.WriteLine("잘못 선택"); break;
                }

                WbGlobal.Pause();
            }
        }
示例#3
0
        public void Withdraw()         // 출 금
        {
            //변수 선언 및 초기화
            int id    = WbGlobal.InputInt("계좌 ID");
            int money = WbGlobal.InputInt("출금액");

            try
            {
                //연산
                int idx = IdToIdx(id);
                pArray[idx].MinMoney(money);

                //결과출력
                Console.WriteLine("입금 완료");
            }
            catch (Exception ex)
            {
                Console.WriteLine("[출금에러] {0}", ex.Message);
            }
        }