Esempio n. 1
0
 public cls_Comptable(long pID, string pNom, DateTime pDatedeNaissance, cls_Agence pAgence) : base(pID)
 {
     c_ID              = pID;
     c_Nom             = pNom;
     c_DatedeNaissance = pDatedeNaissance;
     c_Agence          = pAgence;
 }
        private void ChargementAgenceBase()
        {
            string Query     = "SELECT a.ID, a.Nom, a.ID_Commune, a.ID_Directeur FROM agence a, commune com, comptable cmp WHERE a.ID_Commune = com.ID AND a.ID_Directeur = cmp.ID";
            var    cmdAgence = new MySqlCommand(Query, c_cnn);
            var    reader    = cmdAgence.ExecuteReader();
            Dictionary <long, cls_Agence>  l_ListeAgence  = new Dictionary <long, cls_Agence>();
            Dictionary <long, cls_Commune> l_ListeCommune = cls_Commune.getListeCommune;
            cls_Agence l_Agence;

            while (reader.Read())
            {
                l_Agence = new cls_Agence(reader.GetInt64(0), reader.GetString(1), l_ListeCommune[reader.GetInt64(2)]);
                l_ListeAgence.Add(reader.GetInt64(0), l_Agence);
            }
            cls_Agence.setListeAgence(l_ListeAgence);
            reader.Close();
        }
Esempio n. 3
0
 public void setAgence(cls_Agence pAgence)
 {
     c_Agence = pAgence;
 }