コード例 #1
0
ファイル: Main.cs プロジェクト: Ronyehezkel90/GYMErepository
 //CheckGit2
 private void button1_Click(object sender, EventArgs e)
 {
     if (!dict.ContainsKey(comboBox1.Text))
     {
         MessageBox.Show("Please choose Role first.");
     }
     else if (comboBox1.Text=="Client")
     {
         this.Visible = false;
             Clients clients = new Clients();
             clients.Show();  
     }
     else if (textBox1.Text != dict[comboBox1.Text].ToString())
     {
         MessageBox.Show("Wrong Password");
     }
     else
     {
         this.Visible = false;
         if (comboBox1.Text=="Secretery")
         {
             Secretery secretery = new Secretery();
             secretery.Show();  
         }
         else if (comboBox1.Text=="General Manager")
         {
             General_Manager gm = new General_Manager();
             gm.Show();
         }
         else if (comboBox1.Text == "Trainer")
         {
             Trainer t = new Trainer();
             t.Show();
         }
         else if (comboBox1.Text == "Trainer")
         {
             Client client = new Client();
             client.Show();
         }
         else if (comboBox1.Text == "Marketing Manager")
         {
             MarketingManager mm = new MarketingManager();
             mm.Show();
         }
         else if (comboBox1.Text == "Purchasing Manager")
         {
             PurchasingManager pm = new PurchasingManager();
             pm.Show();
         }
     }
 }
コード例 #2
0
 private void Secretery_Click(object sender, EventArgs e)
 {
     this.Visible = false;
     Secretery secretery = new Secretery();
     secretery.Show();  
 }