public SortieArticleUI() { InitializeComponent(); dpiDateOp.SelectedDate = DateTime.Today; dpiDateOp.IsTodayHighlighted = true; dpiDateOp.Text = DateTime.Now.ToString(); eleves = new List <string>(); classes = new List <string>(); achats_setarticle = new List <string>(); articleBL = new GestionArticleBL(); stockers = new List <StockerBE>(); ListeArticles1 = new ObservableCollection <ArticleBE>(); ListeArticles2 = new ObservableCollection <ArticleQTBE>(); CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; Thread.CurrentThread.CurrentCulture = ci; ancien_acheter = new AcheterBE(); classes = articleBL.listerValeurColonneClasse("codeclasse"); cmbClasse.ItemsSource = classes; cmbClasse.SelectedIndex = 0; setarticle = new SetarticleBE(); eleve = new EleveBE(); annee = articleBL.anneeEnCours(); txtAnnee.Text = " / " + annee; txtAnneeScolaire.Text = (annee - 1).ToString(); chargerListeEleves(); LArticleBE = articleBL.listerTousLesArticle(); RemplirDataGrid1(LArticleBE); typeOperation = ENREGISTRER; radioEnregistrement.IsChecked = true; }
public WindowListeDesElevesDuneClasseUI(String codeClasse, int annee) { CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy"; Thread.CurrentThread.CurrentCulture = ci; InitializeComponent(); this.Title = this.Title + " : " + codeClasse; listerEffectifClasseBL = new ListerEffectifClasseBL(); this.codeClasse = codeClasse; this.annee = annee; // A mettre pour que le binding avec le DataGrid fonctionne ! grdListeEleves.DataContext = this; // Initialisation de la collection, qui va s'afficher dans la DataGrid : ListeEleves = new ObservableCollection <EleveBE>(); //List<EleveBE> LEleveBE = null; //// on met la liste "LSerieBE" dans le DataGrid //RemplirDataGrid(LEleveBE); List <InscrireBE> LInscrire = listerEffectifClasseBL.listeDesEffectifsDuneClassePourUneAnnee(codeClasse, Convert.ToString(annee)); List <EleveBE> LEleve = new List <EleveBE>(); if (LInscrire != null) { for (int i = 0; i < LInscrire.Count; i++) { EleveBE eleve = new EleveBE(); eleve.matricule = LInscrire.ElementAt(i).matricule; //LEleve.Add(listerEffectifClasseBL.rechercherEleve(eleve)); eleve = listerEffectifClasseBL.rechercherEleve(eleve); eleve.numero = i + 1; if (eleve.sexe != null && eleve.sexe.Count() != 0) { eleve.sexe = eleve.sexe.ElementAt(0).ToString().ToUpper(); } //on recherche la catégorie de l'élève AppartenirBE appartenir = new AppartenirBE(); List <AppartenirBE> LAppartenir = listerEffectifClasseBL.ListerAppartenirSuivantCritere("matricule = '" + eleve.matricule + "' AND annee = '" + annee + "'"); if (LAppartenir != null && LAppartenir.Count != 0) { eleve.categorie = LAppartenir.ElementAt(0).codeCatEleve; } ListeEleves.Add(eleve); } } grdListeEleves.ItemsSource = ListeEleves; lblTotal.Content = ListeEleves.Count.ToString(); }
public StatutFinancierUI() { CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy"; Thread.CurrentThread.CurrentCulture = ci; InitializeComponent(); prestationBL = new GestionPrestationBL(); montanttranches = new List <MontantTrancheBE>(); payers = new List <PayerBE>(); lignes = new List <LignePrestation>(); eleves = new List <string>(); classes = new List <string>(); eleve = new EleveBE(); fraisInscription = 0; //fraisPrestation = 0; totalAPayer = 0; classes = prestationBL.listerValeursColonneClasse("codeclasse"); cmbClasse.ItemsSource = classes; annee = prestationBL.AnneeEnCours(); txtAnnee.Text = " / " + annee.ToString(); txtAnneeScolaire.Text = (annee - 1).ToString(); txtTotal.IsEnabled = false; txtTotalVerse.IsEnabled = false; txtResteAPayer.IsEnabled = false; }
//retourne le profil académique d'un élève //public List<ProfilAcademiqueBE> getProfilAcademiqueEleve(String matricule) { // return eleveDA. //} //fonction qui génère le profil académique d'un élève public void genererProfilAcademiqueDunEleve(String matricule) { List <LigneProfilAcademique> LLigneProfilAcademique = moyennesDA.infosProfilAcademique(matricule); EleveBE eleve = new EleveBE(); eleve.matricule = matricule; eleve = eleveDA.rechercher(eleve); ClasseBE classe = null; //on recherche la classe actuelle de l'élève ParametresBE param = parametreDA.getParametre(); if (param != null) { List <InscrireBE> LInscrire = inscrireDA.listerSuivantCritere("matricule = '" + matricule + "' AND annee = '" + param.annee + "'"); if (LInscrire != null && LInscrire.Count != 0) { classe = new ClasseBE(); classe.codeClasse = LInscrire.ElementAt(0).codeClasse; classe = classeDA.rechercher(classe); } } if (eleve != null) { CreerEtat etat = new CreerEtat("Profil_Scolaire - " + eleve.matricule, "PROFIL SCOLAIRE "); etat.etatProfilAcademiqueDunEleve(LLigneProfilAcademique, eleve, classe); journalDA.journaliser("impression du profil académique de l'élève de matricule " + eleve.matricule); } }
public WindowGenererCertificatScolariteUI() { InitializeComponent(); eleve = new EleveBE(); eleves = new List <string>(); classes = new List <string>(); creerCertificatScolariteBL = new CreerCertificatScolariteBL(); //txtAnnee.Text = Convert.ToString(System.DateTime.Today.Year); classes = creerCertificatScolariteBL.listerValeurColonneClasse("codeclasse"); ParametresBE param = creerCertificatScolariteBL.getParametres(); if (param != null) { annee = param.annee; txtAnnee.Text = Convert.ToString(param.annee); txtAnneeScolaire.Text = (param.annee - 1).ToString(); } else { txtAnnee.Text = ""; txtAnneeScolaire.Text = ""; } }
public AnnulationVenteUI() { InitializeComponent(); eleves = new List <string>(); classes = new List <string>(); articleBL = new GestionArticleBL(); dpiDate.SelectedDate = DateTime.Today; dpiDate.IsTodayHighlighted = true; dpiDate.Text = DateTime.Now.ToString(); CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; Thread.CurrentThread.CurrentCulture = ci; classes = articleBL.listerValeurColonneClasse("codeclasse"); cmbClasse.ItemsSource = classes; eleve = new EleveBE(); annee = articleBL.anneeEnCours(); acheters = articleBL.listerSuivantCritereAcheters("annee = " + "'" + annee + "'"); txtAnnee.Text = " / " + annee; txtAnneeScolaire.Text = (annee - 1).ToString(); grdListePaiement.ItemsSource = acheters; }
private void txtMatricule_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (txtAnnee.Text != null && txtAnnee.Text != "") { EleveBE eleve = new EleveBE(); eleve.matricule = txtMatricule.Text; EleveBE eleve2 = genererResultatsDunEleveBL.rechercherEleve(eleve); if (eleve2 != null) { //la classe de l'élève String codeClasse = genererResultatsDunEleveBL.getClasseEleve(eleve2.matricule, Convert.ToInt16(txtAnnee.Text)); lblInfoEleve.Content = "[ Nom : " + eleve2.nom + ", Sexe : " + eleve2.sexe + ", Classe : " + codeClasse + "]"; //*************** ensuite on charge dans le comboBox la liste des matières de la classe pour cette année ClasseBE classe = new ClasseBE(); classe.codeClasse = codeClasse; classe = genererResultatsDunEleveBL.rechercherClasse(classe); List <MatiereBE> LMatiereBE = genererResultatsDunEleveBL.ListeMatiereDuneClasse(classe, Convert.ToInt16(txtAnnee.Text)); } else { lblInfoEleve.Content = ""; } } } }
private void radioModification_Checked(object sender, RoutedEventArgs e) { RechercherEleveUI dialog = new RechercherEleveUI(); dialog.ShowDialog(); EleveBE el = null; try { string matricule = dialog.matricule; el = new EleveBE(); el.matricule = matricule; el = eleveBL.rechercherEleve(el); initialiserChamps(el); if (el != null) { txtMatricule.IsEnabled = true; typeValidation = TYPE_MODIFIER; } } catch (Exception) { initialiserChamps(null); } }
private void cmdSupprimer_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Voulez vous supprimer cet étudiant?", "School : Confirmation", System.Windows.MessageBoxButton.YesNo) == MessageBoxResult.Yes) { if (txtMatricule.Text != null & txtMatricule.Text != "") { string mat = txtMatricule.Text; EleveBE eleve = new EleveBE(); eleve.matricule = mat; eleve = eleveBL.rechercherEleve(eleve); if (eleve != null) { eleveBL.supprimerEleve(eleve); MessageBox.Show("élève supprimé dans la base de données", "School brain: Message d'Alerte"); initialiserChamps(null); } else { MessageBox.Show("L'élève n'existe pas dans la base de données", "School brain: Message d'Alerte"); } } else { MessageBox.Show("Veuillez renseigner le matricule"); } } }
private void cmdOK_Click(object sender, RoutedEventArgs e) { if (validerFormulaire()) { string classe = cmbClasse.SelectedValue.ToString(); string sequence = cmbSequence.SelectedValue.ToString(); string sanction = cmbSanction.Text.Split('-')[0].Trim(); string datesanction = dpiDateSanction.SelectedDate.Value.ToString("yyyy-MM-dd"); lignes.Clear(); int num = 1; EleveBE eleve; List <string> matriculeSaisies = new List <string>(); List <SanctionnerBE> sanctionners = new List <SanctionnerBE>(); sanctionners = sanctionClasseBL.listerSanctionnerClasse(classe, sanction, annee, sequence, datesanction); if (sanctionners != null) { eleve = new EleveBE(); foreach (SanctionnerBE s in sanctionners) { eleve.matricule = s.matricule; eleve = sanctionClasseBL.rechercherEleve(eleve); lignes.Add(new LigneSanction(num++, eleve.nom, s.matricule, s.quantité, s.etat, s.datesanction)); matriculeSaisies.Add(s.matricule.ToUpper()); } } eleves = sanctionClasseBL.listerSuivantCritereInscrire("codeclasse = " + "'" + classe + "' and annee = " + "'" + annee + "'"); if (eleves != null) { eleve = new EleveBE(); foreach (InscrireBE i in eleves) { if (!matriculeSaisies.Contains(i.matricule.ToUpper())) { eleve.matricule = i.matricule; eleve = sanctionClasseBL.rechercherEleve(eleve); lignes.Add(new LigneSanction(num++, eleve.nom, eleve.matricule, 0, ETAT, DateTime.Today.Date)); } } } List <LigneSanction> liste = lignes.OrderBy(o => o.nom).ToList(); lignes.Clear(); num = 1; foreach (LigneSanction l in liste) { l.numero = num++; lignes.Add(l); } grdListe.ItemsSource = lignes; grdListe.Items.Refresh(); cmdHistorique.IsEnabled = false; } else { MessageBox.Show("il y'a des champs vides, remplir tous les champs du formulaire", "School brain : alerte"); } }
internal string obtenirNomEleve(string p) { EleveBE eleve = new EleveBE(); eleve.matricule = p; eleve = eleveDA.rechercher(eleve); return(eleve.nom); }
//retourne le profil académique d'un élève //public List<ProfilAcademiqueBE> getProfilAcademiqueEleve(String matricule) { // return eleveDA. //} public void etatCertificatScolarite(int annee, EleveBE eleve, ClasseBE classe, InscrireBE inscription, ParametresBE parametre) { CreerEtat etat = new CreerEtat("Certificat Scolarité - " + eleve.matricule + " - " + annee, "CERTIFICAT DE SCOLARITE \n SCHOOL CERTIFICATE"); etat.etatCertificatScolarite(annee, eleve, classe, inscription, parametre); journalDA.journaliser("impression du certificat de scolarité de l'élève de matricule " + eleve.matricule + " pour l'année " + annee); }
// suprimer un élève public bool supprimerEleve(EleveBE eleve) { if (eleveDA.supprimer(eleve)) { journalDA.journaliser("suppresion de l'élève de matricule " + eleve.matricule); return(true); } return(false); }
// enegistrer un élève public bool enregistrerEleve(EleveBE eleve) { if (eleveDA.ajouter(eleve)) { journalDA.journaliser("Enregistrement d'un élève de matricule " + eleve.matricule); return(true); } return(false); }
private void statutEleve() { CategorieEleveBE c = new CategorieEleveBE(); eleve = new EleveBE(); eleve.matricule = txtMatricule.Text; eleve = prestationBL.rechercherEleve(eleve); if (eleve != null) { matricule = eleve.matricule; //recherche de sa classe InscrireBE inscrire = new InscrireBE(); inscrire.matricule = eleve.matricule; inscrire.annee = annee; inscrire = prestationBL.rechercherInscrire(inscrire); if (inscrire != null) { cmbClasse.Text = inscrire.codeClasse; } //chargement de ses camarades dans la liste des eleves eleves = new List <string>(); string codeclasse = cmbClasse.Text; List <EleveBE> listeleves = new List <EleveBE>(); listeleves = prestationBL.listerElevesDuneClasse(codeclasse, annee); if (listeleves != null) { foreach (EleveBE el in listeleves) { eleves.Add(el.matricule + " - " + el.nom); } } cmbEleve.ItemsSource = eleves; cmbEleve.Items.Refresh(); cmbEleve.Text = eleve.matricule + " - " + eleve.nom; //recherche de sa categorie dans la table appartenir AppartenirBE appartenir = new AppartenirBE(); appartenir.matricule = txtMatricule.Text; appartenir.annee = prestationBL.AnneeEnCours(); appartenir = prestationBL.rechercherCategorie(appartenir); categorie = appartenir.codeCatEleve; c.codeCatEleve = categorie; c = prestationBL.rechercherCategorieEleve(c); //lblNom.Content = eleve.nom + " - Catégorie : " + c.nomCatEleve; payers = prestationBL.listerSuivantCriterePayer("matricule = " + "'" + eleve.matricule + "' and annee =" + "'" + annee + "'"); //fraisInscription = prestationBL.obtenirFraisInscription(eleve); lignes = new List <LignePrestation>(); lignes = chargerGrid(); grdStatus.ItemsSource = lignes; grdStatus.Items.Refresh(); } else { MessageBox.Show("L'élève n'existe pas"); } }
private void nouveauMatricule() { //recherche de sa classe acheters = new List <AcheterBE>(); achats_setarticle = new List <string>(); cmbClasse.Text = ""; InscrireBE inscrire = new InscrireBE(); inscrire.matricule = txtMatricule.Text; inscrire.annee = annee; inscrire = articleBL.rechercherInscrire(inscrire); if (inscrire != null) { cmbClasse.Text = inscrire.codeClasse; } //recherche des eleves inscrits dans cette classe pour charger le combobox des eleves eleves = new List <string>(); string codeclasse = cmbClasse.Text; List <EleveBE> listeleves = new List <EleveBE>(); listeleves = articleBL.listerElevesDuneClasse(codeclasse, annee); if (listeleves != null) { foreach (EleveBE el in listeleves) { eleves.Add(el.matricule + " - " + el.nom); } } cmbEleve.ItemsSource = eleves; eleve = new EleveBE(); eleve.matricule = txtMatricule.Text.ToString(); eleve = articleBL.rechercherEleve(eleve); if (eleve != null) { cmbEleve.Text = eleve.matricule + " - " + eleve.nom; acheters = articleBL.listerSuivantCritereAcheters(" matricule = " + "'" + eleve.matricule + "' AND annee = " + "'" + annee + "'"); if (acheters != null && acheters.Count > 0) { foreach (AcheterBE a in acheters) { achats_setarticle.Add(a.codesetarticle); } cmbArticle.ItemsSource = achats_setarticle; cmbArticle.SelectedIndex = 0; cmbArticle.Items.Refresh(); } } else { MessageBox.Show(MESSAGE_MATRICULE_ERRONE, "School brain:alerte", MessageBoxButton.OK, MessageBoxImage.Exclamation); acheters = new List <AcheterBE>(); achats_setarticle = new List <string>(); cmbArticle.ItemsSource = achats_setarticle; } }
private void cmbEleve_DropDownClosed(object sender, EventArgs e) { if (cmbEleve.Text != null && cmbEleve.Text != "") { string nommat = cmbEleve.Text; txtMatricule.Text = nommat.Split('-')[0].Trim(); eleve.matricule = nommat.Split('-')[0].Trim(); eleve = articleBL.rechercherEleve(eleve); } }
public BullettinSequentiel(EleveBE eleve, ClasseBE classe, int annee, int nbEvaluation, List <LigneBulletinSequentiel> listLigneBulletinSequentiel, ResultatBE resultatSequentiel, List <SanctionnerBE> ListSanction) { this.eleve = null; this.classe = null; this.annee = annee; this.nbEvaluation = nbEvaluation; this.listLigneBulletinSequentiel = listLigneBulletinSequentiel; this.resultatSequentiel = resultatSequentiel; this.ListSanction = ListSanction; }
public BulletinTrimestriel(EleveBE eleve, ClasseBE classe, int annee, int nbSequence, List <LigneBulletinTrimestriel> listLigneBulletinTrimestriel, ResultatTrimestrielBE resultattrimestriel, List <SanctionnerBE> ListSanction) { this.eleve = null; this.classe = null; this.annee = annee; this.nbSequence = nbSequence; this.listLigneBulletinTrimestriel = listLigneBulletinTrimestriel; this.resultattrimestriel = resultattrimestriel; this.ListSanction = ListSanction; }
private void cmdImprimer_Click(object sender, RoutedEventArgs e) { int numero = 1; List <EleveBE> listEleve = new List <EleveBE>(); if (cmbClasse.SelectedValue != null && txtAnnee.Text != "") { listInscrits = new List <InscrireBE>(); string codeclasse = cmbClasse.SelectedValue.ToString(); // classe.codeClasse = codeclasse; // classe = eleveBL.rechercherClasse(classe); // listDiscipline = disciplineBL.listerToutDiscipline(); // listLigneFiche = new List<LigneFicheDiscipline>(); try { int annee = Convert.ToInt32(txtAnnee.Text); listInscrits = eleveBL.listerSuivantCritereInscrire(codeclasse, annee); if (listInscrits != null) { numero = 1; foreach (InscrireBE i in listInscrits) { EleveBE eleve = new EleveBE(); eleve.matricule = i.matricule; eleve = eleveBL.rechercherEleve(eleve); listEleve.Add(eleve); } } CreerEtat etat = new CreerEtat("Situation Finance- " + cmbClasse.Text + "_" + txtAnnee.Text, "Situation Financière des élèves"); //trier la liste avant d'envoyer à létat if (listEleve != null) { List <EleveBE> newList = listEleve.OrderBy(o => o.nom).ToList(); listEleve.Clear(); numero = 1; foreach (EleveBE ligne in newList) { listEleve.Add(ligne); } } etat.etatSituationFinanciereDuneClasse(listEleve, codeclasse, Convert.ToInt32(txtAnnee.Text.ToString())); } catch (Exception err) { MessageBox.Show(err.Message); } } }
internal bool modifierEleve(EleveBE e, EleveBE eleve) { if (eleveDA.modifier(e, eleve)) { journalDA.journaliser("Modification d'un élève " + eleve.matricule); return(true); } else { return(false); } }
private void cmdOK_Click(object sender, RoutedEventArgs e) { cmdOK.IsEnabled = false; string codeclasse = cmbClasse.SelectedValue.ToString(); string codematiere = cmbMatiere.SelectedValue.ToString(); string codeeval = cmbEvaluation.SelectedValue.ToString(); string codeseq = cmbSequence.SelectedValue.ToString(); int i = 1; EleveBE eleve = new EleveBE(); notes = new List <NotesBE>(); lignes = new List <LigneSaisieAnonymat>(); notes = anonymatBL.listerSuivantCritereNotes("codemat = " + "'" + codematiere + "' and codeseq = " + "'" + codeseq + "' and codeevaluation = " + "'" + codeeval + "' and annee = " + "'" + annee + "' and matricule in (SELECT matricule from inscrire where codeclasse = " + "'" + codeclasse + "' and annee = " + "'" + annee + "' )"); if (notes != null) { foreach (NotesBE n in notes) { eleve.matricule = n.matricule; eleve = anonymatBL.rechercherEleve(eleve); lignes.Add(new LigneSaisieAnonymat(i++, eleve.nom, n.matricule, n.anonymat)); anonymatsSaisies.Add(n.anonymat); matriculeSaisies.Add(n.matricule.ToUpper()); } } inscrires = anonymatBL.listerSuivantCritereInscrire("codeclasse = " + "'" + codeclasse + "' and annee = " + "'" + annee + "'"); if (inscrires != null) { foreach (InscrireBE inscrire in inscrires) { if (!matriculeSaisies.Contains(inscrire.matricule.ToUpper())) { lignes.Add(new LigneSaisieAnonymat(i++, "", "", "")); } } } List <LigneSaisieAnonymat> liste = lignes.OrderBy(o => o.nom).ToList(); lignes.Clear(); i = 1; foreach (LigneSaisieAnonymat l in liste) { l.numero = i++; lignes.Add(l); } grdListe.ItemsSource = lignes; grdListe.Items.Refresh(); }
private void cmbEleve_DropDownClosed(object sender, EventArgs e) { if (cmbEleve.Text != null && cmbEleve.Text != "") { string nommat = cmbEleve.Text; txtMatricule.Text = nommat.Split('-')[0].Trim(); eleve.matricule = nommat.Split('-')[0].Trim(); eleve = sanctionEleveBL.rechercherEleve(eleve); sanctionners = sanctionEleveBL.listerSuivantCritereSanctionner("matricule =" + "'" + eleve.matricule + "' and annee =" + annee); grdListe.ItemsSource = sanctionners; grdListe.Items.Refresh(); } }
private void cmdImprimer_Click(object sender, RoutedEventArgs e) { if (grdListe.ItemsSource != null) { string matricule = txtMatricule.Text; EleveBE eleve = new EleveBE(); eleve.matricule = matricule; eleve = sanctionEleveBL.rechercherEleve(eleve); CreerEtat creerEtat = new CreerEtat("sanction-" + txtMatricule.Text + "" + DateTime.Today.ToShortDateString(), "historique des sanctions d'un élève"); sanctionEleveBL.journaliser("Impression de l'historique des sanctions de " + eleve.nom); creerEtat.etatSanctionEleve(grdListe, eleve, annee); } }
private void txtAnneeScolaire_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (txtMatricule.Text != null && txtMatricule.Text != "") { // on cherche l'inscription de l'élève pour l'année saisit InscrireBE inscrire = creerCertificatScolariteBL.rechercherInscrireSuivantCritere("matricule = '" + txtMatricule.Text + "' AND annee = '" + txtAnnee.Text + "'"); if (inscrire != null) { EleveBE eleve = new EleveBE(); eleve.matricule = txtMatricule.Text; eleve = creerCertificatScolariteBL.rechercherEleve(eleve); if (eleve != null) { lblInfoEleve.Content = "[Nom :" + eleve.nom + ", Classe : " + inscrire.codeClasse + "]"; if (eleve.photo != "") { try { imageEleve.Source = new BitmapImage(new Uri(ConnexionUI.DOSSIER_PHOTO + eleve.photo)); } catch (Exception) { imageEleve.Source = null; } } else { imageEleve.Source = null; } } else { cmbEleve.Text = ""; lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("Cette élève n'est pas reconnu dans le système ! ", "School Brain : Alerte"); } } else { cmbEleve.Text = ""; lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("Cette élève n'a pas éffectué d'inscription pour l'année choisi ! ", "School Brain : Alerte"); } } } }
public ConvocationParentUC() { InitializeComponent(); classes = new List <string>(); notificationBL = new GestionNotificationBL(); //chkEmail.IsChecked = true; //chkSMS.IsChecked = true; nbcaracteres = 0; annee = notificationBL.anneeEnCours(); eleve = new EleveBE(); classes = notificationBL.listerValeurColonneClasse("codeclasse"); cmbClasse.ItemsSource = classes; lblStatut.Content = GestionNotificationBL.INFORMATIONS_NON_VALIDEES; }
private void cmdValider_Click(object sender, RoutedEventArgs e) { if ((txtAnneeScolaire.Text != "" && txtMatricule.Text != "") && (txtAnneeScolaire.Text != null && txtMatricule.Text != null)) { EleveBE eleve = new EleveBE(); eleve.matricule = txtMatricule.Text; eleve = creerCertificatScolariteBL.rechercherEleve(eleve); if (eleve != null) { // on cherche l'inscription de l'élève pour l'année saisit InscrireBE inscrire = creerCertificatScolariteBL.rechercherInscrireSuivantCritere("matricule = '" + txtMatricule.Text + "' AND annee = '" + txtAnnee.Text + "'"); if (inscrire != null) { //on recherche la classe de l'élève ClasseBE classe = new ClasseBE(); classe.codeClasse = inscrire.codeClasse; classe = creerCertificatScolariteBL.rechercherClasse(classe); ParametresBE parametre = creerCertificatScolariteBL.getParametres(); creerCertificatScolariteBL.etatCertificatScolarite(Convert.ToInt16(txtAnnee.Text), eleve, classe, inscrire, parametre); } else { lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("cet élève n'a pas effectué d'inscription pour l'année choisi ! ", "School Brain alerte"); } } else { lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("Cette élève n'est pas reconnu dans le système ! ", "School Brain alerte"); } } else { lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("Tous les champs doivent êtres remplis ! ", "School Brain alerte"); } }
public Payer_Prestation() { InitializeComponent(); dpiDateOp.SelectedDate = DateTime.Today; dpiDateOp.IsTodayHighlighted = true; dpiDateOp.Text = DateTime.Now.ToString(); CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy"; Thread.CurrentThread.CurrentCulture = ci; prestationBL = new GestionPrestationBL(); montanttranches = new List <MontantTrancheBE>(); listprestation = new List <string>(); listtranches = new List <string>(); choixDispense = new List <string>() { BOURSE, REMISE }; classes = new List <string>(); eleves = new List <string>(); payers = new List <PayerBE>(); lignes = new List <LignePrestation>(); eleve = new EleveBE(); payer = new PayerBE(); prestation = new PrestationBE(); // fraisInscription = 0; fraisPrestation = 0; totalAPayer = 0; classes = prestationBL.listerValeursColonneClasse("codeclasse"); cmbClasse.ItemsSource = classes; cmbDispense.ItemsSource = choixDispense; annee = prestationBL.AnneeEnCours(); listtranches = prestationBL.listerValeursColonneTranche("codetranche"); cmbTranche.ItemsSource = listtranches; txtAnnee.Text = " / " + annee; txtAnneeScolaire.Text = (annee - 1).ToString(); txtTotal.IsEnabled = false; txtTotalVerse.IsEnabled = false; txtResteAPayer.IsEnabled = false; txtReste.IsEnabled = false; txtRemise.IsEnabled = false; cmbDispense.IsEnabled = false; txtMontant.IsEnabled = false; }
private void cmbEleve_DropDownClosed(object sender, EventArgs e) { if (cmbEleve.Text != null && cmbEleve.Text != "") { string nommat = cmbEleve.Text; txtMatricule.Text = nommat.Split('-')[0].Trim(); eleve.matricule = nommat.Split('-')[0].Trim(); eleve = creerCertificatScolariteBL.rechercherEleve(eleve); InscrireBE inscrire = creerCertificatScolariteBL.rechercherInscrireSuivantCritere("matricule = '" + txtMatricule.Text + "' AND annee = '" + txtAnnee.Text + "'"); if (inscrire != null) { eleve.matricule = txtMatricule.Text; eleve = creerCertificatScolariteBL.rechercherEleve(eleve); if (eleve != null) { lblInfoEleve.Content = "[Nom :" + eleve.nom + ", Classe : " + inscrire.codeClasse + "]"; if (eleve.photo != "") { try { imageEleve.Source = new BitmapImage(new Uri(ConnexionUI.DOSSIER_PHOTO + eleve.photo)); } catch (Exception) { imageEleve.Source = null; } } else { imageEleve.Source = null; } } else { lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("Cette élève n'existe pas dans le système ! ", "School Brain : Alerte"); } } else { lblInfoEleve.Content = ""; imageEleve.Source = null; MessageBox.Show("Cette n'a pas éffectué d'inscription pour l'année choisi ! ", "School Brain : Alerte"); } } }
private void cmbClasse_DropDownClosed(object sender, EventArgs e) { if (cmbClasse.SelectedValue != null && txtAnnee.Text != "") { inscrits = new List <InscrireBE>(); string codeclasse = cmbClasse.SelectedValue.ToString(); classe.codeClasse = codeclasse; classe = eleveBL.rechercherClasse(classe); try { EleveBE eleve = new EleveBE(); inscrits = eleveBL.listerSuivantCritereInscrire(codeclasse, annee); lignes.Clear(); lignesMere.Clear(); if (inscrits != null) { int numero = 1; foreach (InscrireBE i in inscrits) { eleve.matricule = i.matricule; eleve = eleveBL.rechercherEleve(eleve); LigneEleve l = new LigneEleve(numero++, eleve.matricule, eleve.nom, eleve.dateNaissance.ToShortDateString(), eleve.telephone, eleve.telParent, eleve.adresse); lignes.Add(l); } } //tri de la liste List <LigneEleve> liste = lignes.OrderBy(o => o.nom).ToList(); lignes.Clear(); int j = 1; foreach (LigneEleve l in liste) { l.numero = j++; lignes.Add(l); lignesMere.Add(l); } grdListe.ItemsSource = lignes; grdListe.Items.Refresh(); } catch (Exception) { MessageBox.Show("Format de champ Année academique non valide", "school brain:Alerte"); } } }