Пример #1
0
 private void btnModifier_Click(object sender, EventArgs e)
 {
     DS1.JoueurRow J = new JoueurTableAdapter().GetData().FindById(Convert.ToInt32(txtId.Text));
     J.Nom        = txtLastName.Text;
     J.Prenom     = txtName.Text;
     J.Natonalite = txtNationality.Text;
     J.idEquipe   = (int)cmbIdEquipe.SelectedValue;
     new JoueurTableAdapter().Update(J);
     this.Actualiser();
 }
Пример #2
0
        private void btnSupprimer_Click(object sender, EventArgs e)
        {
            string message = "est tu sur de supprimer ce Joueur";

            if (MessageBox.Show(message, "Message de confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                DS1.JoueurRow J = new JoueurTableAdapter().GetData().FindById(Convert.ToInt32(txtId.Text));

                J.Delete();
                new JoueurTableAdapter().Update(J);
                this.Actualiser();
            }
        }