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;
        }
        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");
            }
        }
        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;
        }