コード例 #1
0
ファイル: menu.cs プロジェクト: felixhal/bank-app
 void directory()
 {
     //If users inputs 1 than load Create Account
     if (option == 1)
     {
         Console.Clear();
         CreateAccount c1 = new CreateAccount();
         c1.inputFields();
         exit();
     }
     //If users inputs 2 than load Search Account
     else if (option == 2)
     {
         Console.Clear();
         SearchForAccount s1 = new SearchForAccount();
         s1.inputSearch();
         exit();
         //If users inputs 3 than load Deposit
     }
     else if (option == 3)
     {
         Console.Clear();
         Deposit d1 = new Deposit();
         d1.inputDeposit();
         exit();
         //If users inputs 4 than load Withdraw
     }
     else if (option == 4)
     {
         Console.Clear();
         Withdraw w1 = new Withdraw();
         w1.inputWithdraw();
         exit();
     }
     //If users inputs 5 than load Statement
     else if (option == 5)
     {
         Console.Clear();
         Statement st1 = new Statement();
         st1.inputSearch();
         exit();
         //If users inputs 6 than load Delete
     }
     else if (option == 6)
     {
         Console.Clear();
         Delete d1 = new Delete();
         d1.inputDelete();
         exit();
         //If users inputs 7 than close console
     }
     else if (option == 7)
     {
         Environment.Exit(0);
     }
     //If users input anything else than gives
     else
     {
         Console.WriteLine("This is not correct");
         mainMenu();
     }
 }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            CreateAccount create_acc = new CreateAccount();

            create_acc.Show();
        }