public void updateProduct(Product product) { string query = "UPDATE ProductTable SET Name = '" + product.Name + "', AmountLeft = '" + product.AmountLeft + "', VenderId = '" + product.vender.ID + "', UnitPrice = '" + product.UnitPrice + "' WHERE ProductId = '" + product.ID + "'; "; DBConnection.ExecuteQuery(query); }
public void deleteProduct(int productId) { string query = "DELETE FROM ProductTable where ProductId = '" + productId + "';"; DBConnection.ExecuteQuery(query); }