Exemplo n.º 1
0
        public static ObservableCollection <DAOPersonne> selectBenevoles()
        {
            ObservableCollection <DAOPersonne> ListeBene = new ObservableCollection <DAOPersonne>();
            string       query   = "SELECT * FROM personne WHERE AdminBénévole = 1;";
            MySqlCommand command = new MySqlCommand(query, DALConnection.Connection());

            try
            {
                command.ExecuteNonQuery();
                MySqlDataReader reader = command.ExecuteReader();

                while (reader.Read())
                {
                    DAOPersonne bene = new DAOPersonne(reader.GetInt32(0), reader.GetString(1), reader.GetString(2), reader.GetInt32(3));
                    ListeBene.Add(bene);
                }
                reader.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show("Une erreur est survenue impossible de continuer...");
            }
            return(ListeBene);
        }
Exemplo n.º 2
0
        public static ObservableCollection <DAOEtude> selectEtudes()
        {
            ObservableCollection <DAOEtude> listeEtudes = new ObservableCollection <DAOEtude>();
            string       query   = "SELECT * FROM etude;";
            MySqlCommand command = new MySqlCommand(query, DALConnection.Connection());

            try
            {
                command.ExecuteNonQuery();
                MySqlDataReader reader = command.ExecuteReader();

                while (reader.Read())
                {
                    DAOEtude etude = new DAOEtude(reader.GetInt32(0), reader.GetString(1), reader.GetDateTime(2), reader.GetInt32(3));
                    listeEtudes.Add(etude);
                }
                reader.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show("Une erreur est survenue impossible de continuer...");
            }
            return(listeEtudes);
        }
Exemplo n.º 3
0
 public DALPlage()
 {
     DALConnection.Connection();
     connection = DALConnection.connection;
 }
 public DALZonePrelevement()
 {
     DALConnection.Connection();
     connection = DALConnection.connection;
 }
Exemplo n.º 5
0
 public DALZoneEspece()
 {
     DALConnection.Connection();
     connection = DALConnection.connection;
 }
Exemplo n.º 6
0
 public DALPersonne()
 {
     DALConnection.Connection();
     connection = DALConnection.connection;
 }
Exemplo n.º 7
0
 public DALEtude()
 {
     DALConnection.Connection();
     connection = DALConnection.connection;
 }
Exemplo n.º 8
0
 public DALEspèce()
 {
     DALConnection.Connection();
     connection = DALConnection.connection;
 }