private void ajoutCategorie_Click(object sender, EventArgs e) { var frmDetails = new frmDetCateg(); frmDetails.modifierChamp("a"); frmDetails.ShowDialog(); update(); }
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; } }
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; } }
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(); }