Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void deleteProduct(int productId)
        {
            string query = "DELETE FROM ProductTable where ProductId = '" + productId + "';";

            DBConnection.ExecuteQuery(query);
        }