private void dgvInteraction_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int rowIndex = e.RowIndex; DataGridViewRow row = dgvInteraction.Rows[rowIndex]; DAOInteractions.supprInteraction(Int32.Parse(row.Cells[0].Value.ToString()), Int32.Parse(row.Cells[0].Value.ToString())); }
private void btnProDissocier_Click(object sender, EventArgs e) { int inter1 = 0; int inter2 = 0; foreach (DataGridViewRow row in dgvInteraction.SelectedRows) { inter1 = Int32.Parse(row.Cells[0].Value.ToString()); inter2 = Int32.Parse(row.Cells[1].Value.ToString()); } DAOInteractions.supprInteraction(inter1, inter2); actualiserProduit(); }