public AdherentController() { aDA = new AdherentDA(); participantDA = new ParticipantDA(); participationDA = new ParticipationDA(); conjointDA = new ConjointDA(); enfantDA = new EnfantDA(); }
public ActiviteController() { aDA = new ActiviteDA(); bDA = new BudgetDA(); adDA = new AdherentDA(); oDA = new OrganisateurDA(); bcDA = new BudgetCategorieDA(); }
public ContribuesController() { aDA = new AdherentDA(); cDA = new ContribuesDA(); bDA = new BudgetDA(); bcDA = new BudgetCategorieDA(); date = new DateValue(); }
private void btAnnuler_Click(object sender, EventArgs e) { AdherentDA aa = new AdherentDA(); List <String> list = aa.listAdresse(); foreach (String c in list) { MessageBox.Show(c); } DialogResult a = MessageBox.Show("Voulez vous quitter ?", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (a == DialogResult.Yes) { this.Close(); } }
private void dataActiviteActuel_SelectionChanged(object sender, EventArgs e) { try { a = new AdherentDA(); listAdherent = pc.DemandeListAdherent(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); listConjoint = pc.DemandeListConjoint(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); listEnfant = pc.DemandeListEnfant(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); pc.AfficheDemandeParActivite(dataDemande, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); paC.afficherNonPayer(dataNonPaiment, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); } catch (Exception ex) { System.Console.WriteLine("error :" + ex.Message); } }
private void metroButton1_Click(object sender, EventArgs e) { AdherentDA a = new AdherentDA(); List <Participation> list = new List <Participation>(); list = pc.DemandeListAdherent(getIdActivite()); int reste = int.Parse(viewReste.Text.ToString()); int nbr = 0; foreach (Participation l in list) { MessageBox.Show(l.participant.matricule + ""); } if (nbr <= reste) { reste = nbr; } }
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); } }
public BudgetController() { bDA = new BudgetDA(); aDA = new AdherentDA(); }
private void btAccepter_Click(object sender, EventArgs e) { try { ActiviteDA aDA = new ActiviteDA(); AdherentDA aDDA = new AdherentDA(); ParticipantDA pDA = new ParticipantDA(); int reste = aDA.restePlace(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); if (reste <= 0) { MessageBox.Show("Le nombre de place est peline", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { int i = 0; int nbr = 0; foreach (Participation l in listAdherent) { nbr++; } if (nbr <= reste) { reste = nbr; } else { } Mailing m; foreach (Participation l in listAdherent) { if ((aDDA.getNombrePoint(l.participant.matricule) <= 0)) { pc.refuser(l.id); MessageBox.Show("Demande réfusé", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); continue; } else { foreach (String a in a.listAdresse(l.participant.matricule)) { m = new Mailing(a, "Notification", "Vous etes le bienvenue , nous avons accepte votre demande"); m.sendMail(); } pc.AccepterAdherent(l.participant.matricule, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()), 0, int.Parse(dataActiviteActuel.CurrentRow.Cells[4].Value.ToString())); if (i == reste) { MessageBox.Show("Erreur"); break; } i++; } } foreach (Participation l in listConjoint) { pc.AccepterConjoint(l.participant.matricule, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()), 0, 0); } foreach (Participation l in listEnfant) { pc.AccepterEnfant(l.participant.matricule, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString()), 0, 0); } a = new AdherentDA(); listAdherent = pc.DemandeListAdherent(int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); pc.AfficheDemandeParActivite(dataDemande, int.Parse(dataActiviteActuel.CurrentRow.Cells[0].Value.ToString())); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }