Esempio n. 1
0
        private void ajoutCategorie_Click(object sender, EventArgs e)
        {
            var frmDetails = new frmDetCateg();

            frmDetails.modifierChamp("a");

            frmDetails.ShowDialog();
            update();
        }
Esempio n. 2
0
        private void ajoutCategorie_Click(object sender, EventArgs e)
        {
            var frmDetails = new frmDetCateg(lvlAcces);

            frmDetails.modifierChamp("a");
            frmDetails.ShowDialog();
            update();
            if (frmDetails.categSelect != null)
            {
                int R = gestionCateg.RowsById(frmDetails.categSelect.codeCateg, gridCateg);
                gridCateg.Rows[R].Cells[0].Selected = true;
                gridCateg.Rows[R].Selected = true;
                Ligne = R;
            }
        }
Esempio n. 3
0
        private void modifierCateg()
        {
            var frmDetails = new frmDetCateg(lvlAcces);
            Categorie categSelect = new Categorie();
            int index = gridCateg.SelectedRows[0].Index;

            categSelect.codeCateg = (string)gridCateg.Rows[index].Cells[0].Value;
            categSelect.descCateg = (string)gridCateg.Rows[index].Cells[1].Value;
            categSelect.comCateg = (string)gridCateg.Rows[index].Cells[2].Value;

            frmDetails.categSelect = categSelect;
            frmDetails.modifierChamp("m");

            frmDetails.ShowDialog();
            update();
            if (frmDetails.categSelect != null)
            {
                int R = gestionCateg.RowsById(frmDetails.categSelect.codeCateg, gridCateg);
                gridCateg.Rows[R].Cells[0].Selected = true;
                gridCateg.Rows[R].Selected = true;
                Ligne = R;
            }
        }
Esempio n. 4
0
        private void modifierCateg()
        {
            var frmDetails = new frmDetCateg();
            Categorie categSelect = new Categorie();
            int index = gridCateg.SelectedRows[0].Index;

            categSelect.codeCateg = (string)gridCateg.Rows[index].Cells[0].Value;
            categSelect.descCateg = (string)gridCateg.Rows[index].Cells[1].Value;
            categSelect.comCateg = (string)gridCateg.Rows[index].Cells[2].Value;

            frmDetails.categSelect = categSelect;
            frmDetails.modifierChamp("m");

            frmDetails.ShowDialog();
            update();
        }