private void ajoutGenre_click(object sender, EventArgs e) { var frmDetails = new frmDetGenre(); frmDetails.modifierChamp("a"); frmDetails.ShowDialog(); }
private void detailsGenre_click(object sender, EventArgs e) { var frmDetails = new frmDetGenre(); frmDetails.modifierChamp("m"); frmDetails.ShowDialog(); }
private void ajoutGenre_click(object sender, EventArgs e) { var Details = new frmDetGenre(); if (GridGenre.SelectedRows.Count == 0) Details.Tag = "0"; else Details.Tag = this.Tag; Details.modifierChamp("a"); Details.ShowDialog(); if (Details.Tag.ToString() == "0") this.Tag = "0"; else this.Tag = Details.Tag; update(); }
private void btnCopier_Click(object sender, EventArgs e) { Genre cop = new Genre(); frmDetGenre frmCop; cop.nomGenre = txtNom.Text; cop.comGenre = rtxtCom.Text; frmCop = new frmDetGenre(cop); frmCop.remplirChamp(); frmCop.btnCopier.Enabled = false; frmCop.btnSupprimer.Enabled = false; frmCop.btnActiverModif.Enabled = false; frmCop.txtNom.ReadOnly = false; frmCop.rtxtCom.ReadOnly = false; frmCop.statut = "Copie"; frmCop.ShowDialog(); if (frmCop.annuler == false) { this.Tag = frmCop.Tag; this.Close(); } frmCop.Closed += (s, args) => this.Close(); }
private void modifierGenre() { var detGenre = new frmDetGenre(); Genre genreSel = new Genre(); int index = GridGenre.SelectedRows[0].Index; genreSel.idGenre = Int32.Parse((string)GridGenre.Rows[index].Cells[0].Value); genreSel.nomGenre = (string)GridGenre.Rows[index].Cells[1].Value; genreSel.comGenre = (string)GridGenre.Rows[index].Cells[2].Value; detGenre.Tag = genreSel.nomGenre; detGenre.genreSelect = genreSel; detGenre.modifierChamp("m"); detGenre.ShowDialog(); if (detGenre.Tag.ToString() == "0") this.Tag = 0; else this.Tag = detGenre.Tag; update(); }