Esempio n. 1
0
        private void btnModifier_Click(object sender, EventArgs e)
        {
            Frm_Ajout_Mod_Produit frmAddMod = new Frm_Ajout_Mod_Produit();

            if (selectVerif() == null)
            {
                for (int i = 0; i < dgProduit.Rows.Count; i++)
                {
                    if ((bool)dgProduit.Rows[i].Cells[0].Value == true)
                    {
                        frmAddMod.idProduit = int.Parse(dgProduit.Rows[i].Cells[1].Value.ToString());

                        frmAddMod.txtCode.Text        = dgProduit.Rows[i].Cells[2].Value.ToString();
                        frmAddMod.txtDesignation.Text = dgProduit.Rows[i].Cells[3].Value.ToString();
                        frmAddMod.txtQteMin.Text      = dgProduit.Rows[i].Cells[4].Value.ToString();
                        frmAddMod.txtQteCrit.Text     = dgProduit.Rows[i].Cells[5].Value.ToString();
                        frmAddMod.txtPU.Text          = dgProduit.Rows[i].Cells[6].Value.ToString();
                        //frmAddMod.txtQteMax.Text = dgProduit.Rows[i].Cells[3].Value.ToString();
                        frmAddMod.cbxCategorie.Text = dgProduit.Rows[i].Cells[7].Value.ToString();

                        frmAddMod.txtCode.ForeColor        = Color.White;
                        frmAddMod.txtDesignation.ForeColor = Color.White;
                        frmAddMod.txtQteMin.ForeColor      = Color.White;
                        frmAddMod.txtQteCrit.ForeColor     = Color.White;
                        frmAddMod.txtPU.ForeColor          = Color.White;
                        frmAddMod.lblTitre.Text            = "Modifier Produit";
                    }
                }
                frmAddMod.ShowDialog();
            }
            else
            {
                MessageBox.Show(selectVerif(), "Alert");
            }
        }
Esempio n. 2
0
        private void btnAjouter_Click(object sender, EventArgs e)
        {
            Frm_Ajout_Mod_Produit frame = new Frm_Ajout_Mod_Produit();

            frame.ShowDialog();
        }