Пример #1
0
 private void refresh()
 {
     lbldate.Text = DateTime.Now.ToShortDateString();
     timer1.Start();
     ac.affihcer(dataAdherent);
     comboAnnee.Items.Clear();
     dataActivite.ClearSelection();
     comboAnnee.Items.Add("Les activité actuelle");
     for (int i = 2006; i < 2050; i++)
     {
         comboAnnee.Items.Add(i.ToString());
     }
     oc.affiche(dataOrganisation);
     adC.afficher(dataUtilisateur);
     bc.AfficherBudget(dataBudget);
     acc.ActiviteActuel(dataActiviteActuel);
     try
     {
         a            = new AdherentDA();
         listAdherent = pc.DemandeListAdherent(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()));
         pc.getParticipationConjoint(dataDemande, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()));
     }
     catch (Exception ex)
     {
         System.Console.WriteLine("error :" + ex.Message);
     }
     try
     {
         a            = new AdherentDA();
         listAdherent = pc.DemandeListAdherent(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()));
         listEnfant   = pc.DemandeListEnfant(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()));
         listConjoint = pc.DemandeListConjoint(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()));
         pc.getParticipationEnfant(dataDemande, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()));
     }
     catch (Exception ex)
     {
         System.Console.WriteLine("error :" + ex.Message);
     }
     foreach (Budget b in bc.listBudget())
     {
         chart1.Series["Budget"].Points.AddXY(b.annee, b.montant_final);
     }
 }