Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 29th, 2007, 01:57 PM
Authorized User
 
Join Date: Sep 2006
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database / Datagrid Query

Hi,

I wondered if someone could help with a query I have ? I've written a checkout

based web site using asp.net 1.1 and vb.net. After payment has been taken I then

want to go back and subtract the number of items purchased by the customer from

the products table within the access database.

The customer receives a summary of what items they have purchased via a datagrid.

This datagrid obtains the data from the cart items table within the database. How

do I reference the actual item (identified by the ProductID) and its quantity

within the datagrid ? I can then use this information to then subtract the

quantity value from the products table within the database. Is this the best way

to approach this ?

Any on-line examples or source code would help.

Many Thanks,


 
Old January 29th, 2007, 02:12 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Why can't you just use the OrderID and create a function to subtract the products from inventory that way? When you grab the products for the datagrid, grab the ProductID's and the quantities and substract them then and there in the same function that is creating the datagrid.

??



 
Old January 29th, 2007, 05:41 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

rsm42: I would make verifying product quantity availability, product replenishment and product quantity sold as part of an Inventory Management Module of your business logic layer. As a Customer, if quantity ordered is NOT KNOWN or displayed prior to product selection, it very well better be known by checkout. When the Invoice is printed with "the count and amount", as a Customer, that is what I expect to receive and pay. Then how are partial orders, aback orders and return orders or products(Return Authorization Process) handled? All should be processed in the Inventory Management Module.

Hope this helps.
 
Old January 29th, 2007, 06:00 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

rsm42: I more thing I would like to add to my previous reply:
  Each Order is a DataTable which Binds to a Datagrid and as a DataTable using the DataRow and DataColumn, one can extract the productID and Quantity to calulate the product cost and decrement the quantity in inventory after the customer accepts the invoice for payment.





Similar Threads
Thread Thread Starter Forum Replies Last Post
query to get same field twice in datagrid Aneri ASP.NET 1.0 and 1.1 Basics 1 March 1st, 2007 05:56 PM
Datagrid Query rsm42 ASP.NET 1.0 and 1.1 Basics 0 January 5th, 2007 02:41 PM
update DataBase from DataGrid AnwarSadique C# 1 July 26th, 2006 09:03 AM
How to add to datagrid without database annsary ASP.NET 1.0 and 1.1 Professional 17 April 3rd, 2006 08:44 PM
Binding Results of an Xpath query to a datagrid cowa ADO.NET 2 November 17th, 2003 02:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.