Exemplo n.º 1
0
        private void btnmodifierproduit_Click(object sender, EventArgs e)
        {
            Ajouter_Modifier_Fournisseur frm = new Ajouter_Modifier_Fournisseur(this);

            if (SelectVerif() == null)
            {
                for (int i = 0; i < dvgFourn.Rows.Count; i++)
                {
                    if ((bool)dvgFourn.Rows[i].Cells[0].Value == true) // si le checkBox est vrai affichier les informations dans le formulaire Client
                    {
                        frm.idSelect    = (int)dvgFourn.Rows[i].Cells[1].Value;
                        frm.txtNom.Text = dvgFourn.Rows[i].Cells[2].Value.ToString();
                        frm.txtAdd.Text = dvgFourn.Rows[i].Cells[3].Value.ToString();
                        frm.txtTel.Text = dvgFourn.Rows[i].Cells[4].Value.ToString();
                    }
                }

                frm.lbltitre.Text         = "Modifier Produit";
                frm.btnactualiser.Visible = false;
                frm.ShowDialog();
            }
            else
            {
                MessageBox.Show(SelectVerif(), "Modification", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        //private void txtrecherche_Enter(object sender, EventArgs e)
        //  {

        //   if (txtrecherche.Text == "Recherche")
        //  {
        //     txtrecherche.Text = "";
        //  txtrecherche.ForeColor = Color.Black;
        //}
        // }

        private void btnajout_Click(object sender, EventArgs e)
        {
            Ajouter_Modifier_Fournisseur fournisseur = new Ajouter_Modifier_Fournisseur(this);

            fournisseur.ShowDialog();
        }