예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            mayoropening m1 = new mayoropening(id);

            m1.Show();
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != null || textBox2.Text != null)
     {
         string userid = textBox1.Text;
         string pass   = textBox2.Text;
         if (checkAccount(userid, pass))
         {
             MessageBox.Show("Successfully Match");
             if (userid[0] == 'M' && userid[1] == 'e')
             {
                 this.Hide();
                 mayoropening m3 = new mayoropening(textBox1.Text);
                 m3.Show();
             }
             else if (userid[0] == 'M')
             {
                 this.Hide();
                 mayoropening m1 = new mayoropening(textBox1.Text);
                 m1.Show();
             }
             else if (userid[0] == 'C')
             {
                 this.Hide();
                 mayoropening m2 = new mayoropening(textBox1.Text);
                 m2.Show();
             }
             else if (userid[0] == 'E')
             {
                 this.Hide();
                 electionopeningform elec = new electionopeningform();
                 elec.Show();
             }
         }
         else
         {
             MessageBox.Show("Invalid Username or Password");
         }
     }
 }