Esempio n. 1
0
        public static int CheckInventory(int productID)
        {
            InventoryModel data = new InventoryModel
            {
                ProductID = productID
            };

            string sql = @"select sum(QTY) from dbo.inventory
                          WHERE ProductID = @ProductID";

            var inventory = SqlDataAccess.QueryScalar(sql, data);

            return(inventory);
        }