private void button5_Click_1(object sender, EventArgs e)
        {
            Form16 f3 = new Form16();

            this.Hide();
            f3.Show();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            Form16 f2 = new Form16();

            this.Hide();
            f2.Show();
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string id = textBox2.Text;
            string t1 = textBox1.Text;


            if (id == "" || t1 == "")
            {
                MessageBox.Show("veuillez remplir les champs");
            }
            else
            {
                connection = new MySqlConnection(@"Database=data_base;Data Source=localhost;User Id=root;Password="******"INSERT INTO `catégorie`(`ID catégorie`, `Code catégorie`) VALUES ('" + textBox2.Text + "','" + textBox1.Text + "') ";
                    MySqlCommand cmd   = new MySqlCommand(query, connection);
                    cmd.ExecuteNonQuery();
                    connection.Close();
                    MessageBox.Show("Ajout terminée avec succès");
                    Form16 f16 = new Form16();
                    this.Hide();
                    f16.Show();
                }
                catch (MySqlException ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
        private void btn_view_booking_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form16 f16 = new Form16(username1);

            f16.ShowDialog();
        }
示例#5
0
        private void button18_Click(object sender, EventArgs e)
        {
            Form16 f16 = new Form16();

            f16.Show();
            this.Hide();
        }
示例#6
0
        /*
         *登录按钮触发事件
         */
        private void button1_Click(object sender, EventArgs e)
        {
            string          wa;
            OleDbConnection a1 = new OleDbConnection();
            OleDbCommand    a2 = new OleDbCommand();

            //数据库连接
            a1.ConnectionString = "Provider=Microsoft.ace.OLEDB.12.0;Data Source= 学生信息管理数据库.accdb";
            a1.Open();
            //在数据库中查找对应 的用户名和密码
            wa             = "Select * from 用户表 where 用户名='" + textBox1.Text.Trim() + "'and 密码='" + textBox2.Text.Trim() + "'and 角色='" + comboBox1.Text.Trim() + "'";
            a2.CommandText = wa;
            a2.Connection  = a1;
            a2.ExecuteScalar();
            //获取到数据证明输入账号正确
            if (null != a2.ExecuteScalar())
            {
                //判断账户类型是否为学生
                if (comboBox1.Text == "学生")
                {
                    MessageBox.Show("欢迎进入信息管理系统学生端!", "登录成功!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Visible = false;
                    Form2 f2 = new Form2();   //Form2为学生端主界面
                    f2.ShowDialog();
                    this.Visible = true;
                }
                else
                {
                    //判断账户类型是否为老师
                    if (comboBox1.Text == "老师")
                    {
                        MessageBox.Show("欢迎进入信息管理系统教师端!", "登录成功!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.Visible = false;
                        Form4 f3 = new Form4();  //Form4为教师端主界面
                        f3.ShowDialog();
                        this.Visible = true;
                    }
                    else
                    {
                        //判断账户类型是否为管理员
                        MessageBox.Show("欢迎进入后台管理模式!", "登录成功!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.Visible = false;
                        Form16 f4 = new Form16();  //Form2为后台管理主界面
                        f4.ShowDialog();
                        this.Visible = true;
                    }
                }
            }
            else  //账户或者密码错误
            {
                MessageBox.Show("登录失败!请输入正确的用户名、密码和角色!", "警告!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
示例#7
0
 private void button5_Click(object sender, EventArgs e)
 {
     //If there is no Form 16 instance
     if (f16 == null)
     {
         //Instantiate Form 16
         f16 = new Form16();
     }
     f16.Show();
     //Set Form 16's Form 7 value as this instance
     f16.f7 = this;
     //Set Form 16's Form 6 value as null
     f16.f6 = null;
     //Hide this form
     this.Hide();
 }
示例#8
0
        private void button1_Click(object sender, EventArgs e)
        {
            string query1 = "UPDATE `type_opération` SET `Libellé type d'opération` ='" + textBox1.Text + "'  WHERE `ID opération `='" + comboBox1.Text + "'";

            connection.Open();
            MySqlCommand cmd1 = new MySqlCommand();

            cmd1.CommandText = query1;
            cmd1.Connection  = connection;
            cmd1.ExecuteNonQuery();
            connection.Close();
            MessageBox.Show("Modification terminée avec succèes");
            Form16 f2 = new Form16();

            this.Hide();
            f2.Show();
        }
        private void button1_Click(object sender, EventArgs e)

        {
            string query1 = "UPDATE `agence` SET `nom_chef d'agence`='" + textBox1.Text + "',`Code_agence`='" + textBox3.Text + "',`ID délégation`='" + comboBox2.Text + "'WHERE `ID agence`='" + comboBox1.Text + "'";

            connection.Open();
            MySqlCommand cmd1 = new MySqlCommand();

            cmd1.CommandText = query1;
            cmd1.Connection  = connection;
            cmd1.ExecuteNonQuery();
            connection.Close();
            MessageBox.Show("Modification terminée avec succèes");
            Form16 f2 = new Form16();

            this.Hide();
            f2.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            connection.Open();
            OleDbCommand command = new OleDbCommand();

            command.Connection = connection;
            int match, ticket;

            int.TryParse(txt_match.Text, out match);
            int.TryParse(txt_ticket.Text, out ticket);
            string query = "delete from Booking where MatchNo=" + match + " and Usernamee='" + username1 + "'";

            command.CommandText = query;
            command.ExecuteNonQuery();

            if (txt_ticket_type.Text == "GrandStand")
            {
                query = "update Venue_Capacity set Grand_Stand=Grand_Stand+" + ticket + " where MatchNo=" + matchno + "";
            }
            else if (txt_ticket_type.Text == "Business")
            {
                query = "update Venue_Capacity set Business_Class=Business_Class+" + ticket + " where MatchNo=" + matchno + "";
            }
            else if (txt_ticket_type.Text == "Lawn")
            {
                query = "update Venue_Capacity set Lawn=Lawn+" + ticket + " where MatchNo=" + matchno + "";
            }
            else if (txt_ticket_type.Text == "Economy")
            {
                query = "update Venue_Capacity set Economy_Class=Economy_Class+" + ticket + " where MatchNo=" + matchno + "";
            }

            command.CommandText = query;
            command.ExecuteNonQuery();

            connection.Close();

            this.Hide();
            Form16 f16 = new Form16(username1);

            f16.ShowDialog();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string num = comboBox1.Text;

            if (num == "")
            {
                MessageBox.Show("Veuillez donner l'identifiant");
                return;
            }
            else
            {  //delete
                string query3 = "DELETE FROM `délégation` WHERE `ID délégation`='" + comboBox1.Text + "' ";
                connection.Open();
                MySqlCommand cmd = new MySqlCommand(query3, connection);
                cmd.ExecuteNonQuery();
                connection.Close();
                MessageBox.Show("suppression terminée");
                Form16 f2 = new Form16();
                this.Hide();
                f2.Show();
            }
        }
        private void button15_Click_1(object sender, EventArgs e)
        {
            Form16 f16 = new Form16();

            f16.Show();
        }
示例#13
0
        private void товарыToolStripMenuItem3_Click(object sender, EventArgs e)
        {
            Form f10 = new Form16();

            f10.Show();
        }
示例#14
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;
            }
        }