//"Delete from Projet where id_projet" + id + ";"
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection cnx = new SqlConnection();

            cnx.ConnectionString = connectionString;
            String     Query = "Delete from Statut where id_projet=" + id + ";";
            SqlCommand cmd   = new SqlCommand(Query, cnx);

            if (cnx.State == ConnectionState.Open)
            {
                cnx.Close();
            }
            cnx.Open();
            cmd.ExecuteNonQuery();
            Supprimerprojet();
            Projet ta = new Projet(id);

            ta.MdiParent = Acceuil.ActiveForm;
            ta.Dock      = DockStyle.Fill;
            ta.Show();
        }
Beispiel #2
0
        private void projetsToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            bool t = false;

            foreach (Form fr in this.MdiChildren)
            {
                if (fr.Text == "Projet")
                {
                    t = true;
                    fr.Focus();
                    break;
                }
            }

            if (t == false)
            {
                Projet p = new Projet(id);
                p.MdiParent = this;
                p.Dock      = DockStyle.Fill;
                p.Show();
            }
        }