コード例 #1
0
        /// <summary>
        /// Menu element : Ajouter un dossier
        /// </summary>
        private void ajouterToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            DlgAjoutDossier d = new DlgAjoutDossier(TypeDeSaisie.Ajout, null);

            d.ShowDialog();

            if (d.DialogResult == DialogResult.OK)
            {
                Dossier dossier = d.Extraire();
                RequetesSQL.SQLEnregistrerDossier(dossier);
                ChargerDossierCompte();
            }
        }
コード例 #2
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"); }
 }