Esempio n. 1
0
 /// <summary>
 /// DataGrid : Dossiers
 /// </summary>
 private void dataGridViewDossier_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         Dossier         dossier = RequetesSQL.SQLChercherDossierParNumero(dataGridViewDossier.Rows[e.RowIndex].Cells[0].Value.ToString());
         DlgAjoutDossier d       = new DlgAjoutDossier(TypeDeSaisie.Modification, dossier);
         d.ShowDialog();
         if (d.DialogResult == DialogResult.OK)
         {
             RequetesSQL.SQLEnregistrerDossier(d.Extraire());
             ChargerDossierCompte();
         }
     }
     catch (Exception excep) { Console.WriteLine("Réessayez svp"); }
 }
Esempio n. 2
0
        // Evenement : colorer nouvelle ligne ajoutée selon destination du dossier
        private void dataGridViewDossier_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            Dossier dossier = RequetesSQL.SQLChercherDossierParNumero(dataGridViewDossier.Rows[e.RowIndex].Cells[0].Value.ToString());

            dataGridViewDossier.Rows[e.RowIndex].DefaultCellStyle.BackColor = PickColorForDossierRow(dossier.Destination.CodeDestination);
        }