TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
357
121.1k
Quantity property
May 8 2012 10:02 AM
Hi
I need help in getting the total quantity for each item persisted to the OrderDetail table in the DB.
Given the following:-
List<OrderDetail> orderDetails // Local variable to hold output
usersShoppingCart.SubmitOrder(User.Identity.Name, out orderDetails);
foreach(OrderDetail od in orderDetails)
{
int quantity = od.Quantity;
}
The quantity variable only holds 1 quantity at a time rather than the total quantity.
For example if I had 2 items in my cart, both with quanitities of 1, only 1 quantity will get stored in the quantity variable but I would like 2, 1 per item.
Any help in achieving this would be great.
Thanks
Steven
Reply
Answers (
4
)
Reg: Loading text file(size 100 MB) in Richtextbox
How to subscribe the tips and articles?