Merge branch 'main' of https://git.bib.de/PBG2H25AGE/WIR-MACHEN-ALLE-ARM
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -31,6 +32,21 @@ namespace Casino
|
|||||||
// execute the command and read the results
|
// execute the command and read the results
|
||||||
using MySqlDataReader myReader = myCommand.ExecuteReader();
|
using MySqlDataReader myReader = myCommand.ExecuteReader();
|
||||||
|
|
||||||
|
while (myReader.Read())
|
||||||
|
{
|
||||||
|
User u = new User(myReader.GetString("name"), myReader.GetInt32("age"), myReader.GetString("passwort"))
|
||||||
|
{
|
||||||
|
ID = myReader.GetString("id"),
|
||||||
|
Name = myReader.GetString("name"),
|
||||||
|
Alter = myReader.GetInt32("age"),
|
||||||
|
Passwort = myReader.GetString("passwort"),
|
||||||
|
Geld = myReader.GetInt32("geld")
|
||||||
|
};
|
||||||
|
|
||||||
|
user.Add(u);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
myConnection.Close();
|
myConnection.Close();
|
||||||
}
|
}
|
||||||
catch (MySql.Data.MySqlClient.MySqlException ex)
|
catch (MySql.Data.MySqlClient.MySqlException ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user