Example #1
0
        public void Dataload1()
        {
            List <Carte> Buss = CarteDao.findAll();

            foreach (Carte carte in Buss)
            {
                cbNumeroCarte.Items.Add(carte.Numero);
            }
        }
Example #2
0
        public void DataCartesload()
        {
            List <Carte> Buss = CarteDao.findAll();
            int          i    = 0;

            dgCartes.Rows.Clear();
            foreach (Carte carte in Buss)
            {
                dgCartes.Rows.Add();
                dgCartes.Rows[i].Cells[0].Value = carte.Numero;
                dgCartes.Rows[i].Cells[1].Value = carte.Porteur;
                dgCartes.Rows[i].Cells[2].Value = carte.Solde;
                dgCartes.Rows[i].Cells[3].Value = carte.SoldeMin;
                dgCartes.Rows[i].Cells[4].Value = carte.Type;
                dgCartes.Rows[i].Cells[5].Value = carte.Code;
                dgCartes.Rows[i].Cells[6].Value = carte.DateCreation;
                dgCartes.Rows[i].Cells[7].Value = carte.DateExpiration;
                i++;
            }
        }