Aufteilung

This commit is contained in:
2026-09-14 21:27:58 +02:00
parent 09a4d0cd40
commit 205126d724
14 changed files with 83 additions and 158 deletions
+14 -13
View File
@@ -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);