Ejemplo n.º 1
0
        public static clsListClient GetClients()
        {
            //Liste temporaire
            clsListClient tmpList = new clsListClient();

            //Commande + Requete SQL
            OleDbCommand cmd = new OleDbCommand(); //commande

            cmd.Connection  = clsGlobal.myCon;
            cmd.CommandText = "SELECT * FROM Clients";
            OleDbDataReader rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                clsClient cl = new clsClient(rd["User"].ToString(), rd["Password"].ToString(),
                                             rd["Email"].ToString(), rd["RefClient"].ToString(),
                                             rd["Type"].ToString(), rd["Phone"].ToString(),
                                             rd["FirstName"].ToString(), rd["LastName"].ToString(), rd["RefEmployee"].ToString());
                tmpList.Ajouter(cl);
                cl = null;
            }
            //fermer le reader
            rd.Close();
            //fermer la connection
            // myCon.Close();
            //retourne la valeur tmpList
            return(tmpList);
        }
Ejemplo n.º 2
0
 public clsCompany(clsListEmployee Employee, clsListClient Client, clsListHouse House)
 {
     this.VEmployee = Employee;
     this.Cliente   = Client;
     this.House     = House;
 }