private void Cmd_PrintFichRensRPT_Click(object sender, EventArgs e) { bool MAJ = false; if (DTGVFicheRensRPT.RowCount != 0) { using (TransactionScope transaction = new TransactionScope()) { try { for (int l = 0; l <= DTGVFicheRensRPT.RowCount - 1; l++) { string DosID = DTGVFicheRensRPT.Rows[l].Cells[8].Value.ToString(); //MAJ MAJ = ExecuteRequete.ExecuteStoredProcedure("MAJStatutDossier", new SqlParameter("@StaId", 11), new SqlParameter("@DosID", DosID), new SqlParameter("@staBL", null), new SqlParameter("@staCRprod", null)); } } catch (Exception Message) { MessageBox.Show(Message.ToString()); } // Valider la transaction transaction.Complete(); } if (MAJ ) { CRV_FichRensRPT.PrintReport(); UtilsProcFunc.Edition(this, 1); } else { UtilsProcFunc.Edition(this, 1); } } else { } }