private void modifier() { if (dataGridView1.Rows.Count == 0) { MessageBox.Show("Liste vide!", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { int numero_Facture = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value); string date_Facture = dataGridView1.CurrentRow.Cells[1].Value.ToString(); double timbre_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[2].Value); double remise_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[3].Value); double montantHT_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[4].Value); double montantTTC_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[5].Value); string statut_Facture = dataGridView1.CurrentRow.Cells[6].Value.ToString(); int Client_codeClient = Convert.ToInt16(dataGridView1.CurrentRow.Cells[7].Value); Facture f = new Facture(numero_Facture, date_Facture, timbre_Facture, remise_Facture, montantHT_Facture, montantTTC_Facture, statut_Facture, Client_codeClient); ModifierFacture m = new ModifierFacture(this, f, ac); m.Show(); ac.Enabled = false; } }
private void modifier() { if (dataGridView1.Rows.Count == 0) MessageBox.Show("Liste vide!", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error); else { int numero_Facture = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value); string date_Facture = dataGridView1.CurrentRow.Cells[1].Value.ToString(); double timbre_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[2].Value); double remise_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[3].Value); double montantHT_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[4].Value); double montantTTC_Facture = Convert.ToDouble(dataGridView1.CurrentRow.Cells[5].Value); string statut_Facture = dataGridView1.CurrentRow.Cells[6].Value.ToString(); int Client_codeClient = Convert.ToInt16(dataGridView1.CurrentRow.Cells[7].Value); Facture f = new Facture(numero_Facture, date_Facture, timbre_Facture, remise_Facture, montantHT_Facture, montantTTC_Facture, statut_Facture, Client_codeClient); ModifierFacture m = new ModifierFacture(this, f,ac); m.Show(); ac.Enabled = false; } }