Aufteilung
This commit is contained in:
+14
-13
@@ -17,6 +17,7 @@ namespace Casino
|
||||
{
|
||||
ObservableCollection<User> user = new ObservableCollection<User>();
|
||||
|
||||
//Lenard Gerdes
|
||||
try
|
||||
{
|
||||
MySql.Data.MySqlClient.MySqlConnection myConnection;
|
||||
@@ -84,7 +85,7 @@ namespace Casino
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Colin Langer
|
||||
public byte[] GetCardImage(int id)
|
||||
{
|
||||
byte[] imageBytes = null;
|
||||
@@ -108,7 +109,7 @@ namespace Casino
|
||||
|
||||
return imageBytes;
|
||||
}
|
||||
|
||||
//Cloin Langer
|
||||
public List<Busfahrer.Card> GetAllCards()
|
||||
{
|
||||
var cards = new List<Busfahrer.Card>();
|
||||
@@ -137,8 +138,8 @@ namespace Casino
|
||||
|
||||
return cards;
|
||||
}
|
||||
|
||||
// NEU: Holt das Bild der Kartenrückseite
|
||||
|
||||
// Holt das Bild der Kartenrückseite Colin Langer
|
||||
public byte[] GetCardBackImage()
|
||||
{
|
||||
byte[] imageBytes = null;
|
||||
@@ -211,10 +212,10 @@ namespace Casino
|
||||
connection.Open();
|
||||
|
||||
string sql = @"
|
||||
SELECT COUNT(*)
|
||||
FROM Nutzer
|
||||
WHERE id = @id
|
||||
AND Rolle = 'Admin'";
|
||||
SELECT COUNT(*)
|
||||
FROM Nutzer
|
||||
WHERE id = @id
|
||||
AND Rolle = 'Admin'";
|
||||
|
||||
using MySqlCommand command = new MySqlCommand(sql, connection);
|
||||
|
||||
@@ -245,8 +246,8 @@ namespace Casino
|
||||
connection.Open();
|
||||
|
||||
string sql = @"
|
||||
DELETE FROM Nutzer
|
||||
WHERE id = @id";
|
||||
DELETE FROM Nutzer
|
||||
WHERE id = @id";
|
||||
|
||||
using MySqlCommand command = new MySqlCommand(sql, connection);
|
||||
|
||||
@@ -283,13 +284,13 @@ namespace Casino
|
||||
connection.Open();
|
||||
|
||||
string sql = @"
|
||||
UPDATE Nutzer
|
||||
SET name = @name,
|
||||
UPDATE Nutzer
|
||||
SET name = @name,
|
||||
age = @age,
|
||||
passwort = @passwort,
|
||||
geld = @geld,
|
||||
Rolle = @rolle
|
||||
WHERE id = @id";
|
||||
WHERE id = @id";
|
||||
|
||||
using MySqlCommand command = new MySqlCommand(sql, connection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user