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 btnCopier_Click(object sender, EventArgs e) { Categorie info = new Categorie(); frmDetCateg formOuvert; info.comCateg = rtxtCommentaire.Text; info.descCateg = txtDesc.Text; formOuvert = new frmDetCateg(info); formOuvert.Tag = "Copie"; formOuvert.remplirChamp(); formOuvert.btnCopier.Enabled = false; formOuvert.btnSupprimer.Enabled = false; formOuvert.btnActiverModif.Enabled = false; formOuvert.ShowDialog(); if (annuler == false) { this.Close(); } formOuvert.Closed += (s, args) => this.Close(); }
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(); }