private void detailsMode_Click(object sender, EventArgs e) { var detailsMode = new frmDetMode(); detailsMode.modifierChamp("m"); detailsMode.ShowDialog(); }
private void ajoutMode_Click(object sender,EventArgs e) { var detailsMode = new frmDetMode(); if (dataGridMode.SelectedRows.Count == 0) detailsMode.Tag = "0"; else detailsMode.Tag = this.Tag; detailsMode.modifierChamp("a"); detailsMode.ShowDialog(); if (detailsMode.Tag.ToString() == "0") this.Tag = "0"; else this.Tag = detailsMode.Tag; update(); }
public void btnCopier_Click(object sender, EventArgs e) { Mode cop = new Mode(); frmDetMode frmCop; cop.nomMode = txtNom.Text; cop.descMode = rtxtDesc.Text; frmCop = new frmDetMode(cop); frmCop.Tag = "Copie"; frmCop.remplirChamp(); frmCop.btnCopier.Enabled = false; frmCop.btnSupprimer.Enabled = false; frmCop.btnActiverModif.Enabled = false; frmCop.ShowDialog(); if (frmCop.annuler == false) { this.Close(); } frmCop.Closed += (s, args) => this.Close(); }
private void modifierMode() { var detailsMode = new frmDetMode(); Mode modSelectionner = new Mode(); int index = dataGridMode.SelectedRows[0].Index; modSelectionner.idMode = Int32.Parse((string)dataGridMode.Rows[index].Cells[0].Value); modSelectionner.nomMode = (string)dataGridMode.Rows[index].Cells[1].Value; modSelectionner.descMode = (string)dataGridMode.Rows[index].Cells[2].Value; detailsMode.Tag = modSelectionner.nomMode; detailsMode.modeSelect = modSelectionner; detailsMode.modifierChamp("m"); detailsMode.ShowDialog(); if (detailsMode.Tag.ToString() == "0") this.Tag = "0"; else this.Tag = detailsMode.Tag; update(); }