diff --git a/ToDo.txt b/ToDo.txt index ca22b8a..4563410 100755 --- a/ToDo.txt +++ b/ToDo.txt @@ -12,7 +12,7 @@ Server: Dont follow theme of website ProductController: - UpdateProduct doesn't update the images in the new SQL table anymore + GetProduct, GetAllProducts, UpdateProduct dont update the images in the new SQL table anymore Client: Program diff --git a/src/MistoxWebsite.Server/Services/DatabaseService/Product.cs b/src/MistoxWebsite.Server/Services/DatabaseService/Product.cs index 58cce17..d2815de 100755 --- a/src/MistoxWebsite.Server/Services/DatabaseService/Product.cs +++ b/src/MistoxWebsite.Server/Services/DatabaseService/Product.cs @@ -2,7 +2,6 @@ using MySql.Data.MySqlClient; using System.Data; using System.Data.Common; -using System.Net.Http.Formatting; namespace MistoxWebsite.Server.Services.DatabaseService { public partial class DatabaseService { @@ -27,18 +26,14 @@ namespace MistoxWebsite.Server.Services.DatabaseService { int _id = reader.GetInt32("ID"); string _name = reader.GetString("Name"); string _description = reader.GetString("Description"); - string _images = reader.GetString("Images"); int _cost = reader.GetInt32("Cost"); string _url = reader.GetString("URL"); - string[] _imageList = _images.Split('|', StringSplitOptions.RemoveEmptyEntries); - items = new Product() { ID = _id, Name = _name, Description = _description, Cost = _cost, - Images = _imageList, URL = _url }; } @@ -60,18 +55,14 @@ namespace MistoxWebsite.Server.Services.DatabaseService { int _id = reader.GetInt32("ID"); string _name = reader.GetString("Name"); string _description = reader.GetString("Description"); - string _images = reader.GetString("Images"); int _cost = reader.GetInt32("Cost"); string _url = reader.GetString("URL"); - string[] _imageList = _images.Split('|', StringSplitOptions.RemoveEmptyEntries); - items.Add(new Product() { ID = _id, Name = _name, Description = _description, Cost = _cost, - Images = _imageList, URL = _url }); }