Last post Mar 16, 2017 09:19 AM by Eric Du
Mar 15, 2017 02:27 PM|priyankarsalunkhe|LINK
Hey, I want to subtract the quantity selected by the user from the database on click of proceed to check out button. How do i do it? And, thanks in advance for the answer!! :)
Mar 15, 2017 03:03 PM|mgebhard|LINK
Your question is too broad to answer.
Click the learn "Link" above and go through a few tutorials related to the ASP framework you are using, Web Forms or MVC, and the data access framework you are using, ADO.NET or EF.
Mar 16, 2017 09:19 AM|Eric Du|LINK
I want to subtract the quantity selected by the user from the database on click of proceed to check out button. How do i do it?
First, you should query the database based on the product ID (using the query statement), and get the number of the inventory. Then, if the database contains enough quantity, you could call the update statement to subtract the quantity, otherwise, cancel
the subtract action.
Here are some relevant articles about CRUD options, you could refer to them.
ASP.Net MySQL CRUD: Select Insert Edit Update and Delete in GridView using MySQL database in ASP.Net:
Entity Framework CRUD: Select Insert Edit Update Delete using Entity Framework in ASP.Net:
Also, you could refer to this article: