Example #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form10 f10 = new Form10();

            f10.Show();
            this.Hide();
        }
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form10 f1 = new Form10();

            f1.Activate();
            f1.Show();
        }
Example #3
0
        private void 奖学金认定结果ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            Form10 f4 = new Form10();

            f4.ShowDialog();
            this.Visible = true;
        }
 private void label2_Click(object sender, EventArgs e)
 {
     //If there is no Form 10 instance
     if (f10 == null)
     {
         //Instantiate Form 10
         f10 = new Form10();
     }
     //Show the new Form 10 instance
     f10.Show();
     //Set Form 10's Form 9 value as this instance
     f10.f9 = this;
     //Hide all the necessary labels in the Form 10 instance
     f10.label13.Hide();
     f10.label14.Hide();
     f10.label15.Hide();
     f10.label16.Hide();
     f10.label17.Hide();
     f10.label18.Hide();
     f10.label19.Hide();
     f10.label20.Hide();
     f10.label21.Hide();
     f10.label22.Hide();
     f10.label23.Hide();
     f10.label24.Hide();
     f10.label25.Hide();
     f10.label26.Hide();
     f10.label27.Hide();
     f10.label28.Hide();
     f10.label29.Hide();
     f10.label30.Hide();
     f10.label31.Hide();
     f10.label32.Hide();
     f10.label33.Hide();
     f10.label34.Hide();
     f10.label35.Hide();
     f10.label36.Hide();
     f10.label37.Show();
     f10.label38.Show();
     f10.label39.Show();
     f10.label40.Show();
     //Set the Form 10's workShopSession string value as label 2's text value
     f10.workshopSession = label2.Text;
     //Hide this form
     this.Hide();
 }
 private void button1_Click_1(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         this.Hide();
         Form9 m = new Form9();
         m.Show();
     }
     else if (radioButton2.Checked)
     {
         this.Hide();
         Form10 m = new Form10();
         m.Show();
     }
     else if (radioButton3.Checked)
     {
         this.Hide();
         Form11 m = new Form11();
         m.Show();
     }
     else if (radioButton4.Checked)
     {
         this.Hide();
         Form12 m = new Form12();
         m.Show();
     }
     else if (radioButton5.Checked)
     {
         this.Hide();
         Form13 m = new Form13();
         m.Show();
     }
     else
     {
         MessageBox.Show("Please choose one of buttons!");
     }
 }
Example #6
0
 private void showToolStripMenuItem2_Click(object sender, EventArgs e)
 {
     Form10 objektForm10 = new Form10();
       objektForm10.Show();
 }
Example #7
0
        private void button5_Click_1(object sender, EventArgs e)
        {
            Form10 yeni = new Form10();

            yeni.Show();
        }
Example #8
0
        private void заказыToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form f10 = new Form10();

            f10.Show();
        }
Example #9
0
        private void button8_gClick(object sender, EventArgs e)
        {
            Form10 frm = new Form10();

            frm.Show();
        }
Example #10
0
        public void Afisare_Forma(string Text_Forma, Form frn, string Close_or_Hide)
        {
            Form f = new Form();

            switch (Text_Forma)
            {
            case "MENIU": f = new Form1(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "LECTII": f = new Form2(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA INTRODUCERE1":
                f = new Form3(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA INTRODUCERE2":
                f = new Form4(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA INTRODUCERE3":
                f = new Form5(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI1":
                f = new Form6(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI2":
                f = new Form7(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI3":
                f = new Form8(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI4":
                f = new Form9(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI5":
                f = new Form10(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI6":
                f = new Form11(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA DREPTUNGHICE":
                f = new Form12(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TESTE":
                f = new Form16(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TEST USOR":
                f = new Test_Usor_Pagina_1(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TEST MEDIU":
                f = new Test_Mediu(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TEST GREU":
                f = new Test_Greu(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;
            }
        }
Example #11
0
 //登录按键响应事件
 private void ButtonLogin_Click(object sender, EventArgs e)
 {
     //新建ClassSqlConnect类,调用重构的ViewCount方法返回从数据库中查询的结果
     ClassSqlConnect log = new ClassSqlConnect();
     SqlDataReader reader = log.ViewCount(ComboxUserName.Text.ToString(),TxtPassword.Text.ToString());
     if (reader.Read())//判断有数据,说明登录成功
     {
         /*保存账号信息,将这部分信息保存在数据库(XML)中更好*/
         ComboxUserName.Items.Add(ComboxUserName.Text.ToString());
         Form nfm;
         //提取用户名信息
         string UName = reader[1].ToString();
         MessageBox.Show("欢迎你,"+ UName);
         //提取权限信息并选择应打开的界面
         switch((int)reader[2])
         {
             case 0:
                 nfm = new Form2();//系统管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 1:
                 nfm = new Form7();//人事经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 2:
                 nfm = new Form3();//人事员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 3:
                 nfm = new Form8();//财务经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 4:
                 nfm = new Form4();//财务员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 5:
                 nfm = new Form9();//销售经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 6:
                 nfm = new Form6();//销售员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 7:
                 nfm = new Form10();//仓库经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 8:
                 nfm = new Form5();//仓库员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             default:
                 MessageBox.Show("你没有登录权限," + UName,"没有权限");
                 ComboxUserName.Text = "";
                 TxtPassword.Text = "";
                 break;
         }
     }
     else
     {
         MessageBox.Show("用户名或密码错误!","错误");
         TxtPassword.Text = "";
     }
     //调用自定义的Close方法关闭sql连接
     log.Close();
 }
Example #12
0
 private void button2_Click(object sender, EventArgs e)
 {
     this.Visible = false;
     Form10 connectionMode = new Form10();
     connectionMode.Show();
 }