Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Close();
            管理员页面 f14 = new 管理员页面();

            f14.ShowDialog();
        }
Esempio n. 2
0
 private void LoginButton_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "")
     {
         MessageBox.Show("用户名或密码不能为空!");
     }
     else
     {
         string a = textBox1.Text;
         string b = textBox2.Text;
         int    c = login(a, b, ref ID, ref type);
         if (c == 0)
         {
             MessageBox.Show("用户名或密码错误!请重试。", "登录错误");
         }
         else
         {
             Hide();
             if (type == 0)
             {
                 管理员界面 f_adm = new 管理员界面();
                 f_adm.Owner = this.Owner;
                 f_adm.ShowDialog();
             }
             if (type == 1)
             {
                 用户主页 f_see = new 用户主页();
                 f_see.Owner = this.Owner;
                 f_see.ShowDialog();
             }
             if (type == 2)
             {
                 管理员页面 f_cmp = new 管理员页面();
                 f_cmp.Owner = this.Owner;
                 f_cmp.ShowDialog();
             }
         }
     }
 }