コード例 #1
0
        public static bool InsertTrans(double subtotal, double tax, double total)
        {
            string str = "INSERT INTO Trans (Subtotal, Tax, Total) VALUES (" + subtotal + ", " + tax + ", " + total + ");";

            return(ProductDB.ExeNonQuery(str));
        }
コード例 #2
0
        public static bool UpdateProduct(string id, int quantity)
        {
            string str = "UPDATE Product SET Qty = " + quantity + " WHERE ID = '" + id + "';";

            return(ProductDB.ExeNonQuery(str));
        }
コード例 #3
0
        public static bool InsertLineItem(int transID, string productID, int qty, double price)
        {
            string str = "INSERT INTO LineItem (TransID, ProductID, Qty, Price) VALUES (" + transID + ", '" + productID + "', " + qty + ", " + price + ");";

            return(ProductDB.ExeNonQuery(str));
        }