Re: Collection Class object enhancements
- From: "WB" <none>
- Date: Tue, 6 Jun 2006 12:31:18 -0700
Yes, you are correct. However, in this case each line item is assigned an
employeeId who receives credit (commission) for the item. So it is possible
that two different employees receive credit for one or more of the same
item. So I am still stuck trying to store the quantity of each item.
WB
"Larry Serflaten" <serflaten@xxxxxxxxxxxxxx> wrote in message
news:OMonPNYiGHA.1260@xxxxxxxxxxxxxxxxxxxxxxx
total
"wb" <none> wrote
I have a collection class that I created to store LineItem objects of a<...>
shopping cart.
Inside my collection class I want to have something that tabulates the
andof each item.<...>
I also created a countNumberId function that takes the item Id (NC001)
this.will return the sum of quantity.<...>
This works ok, but I think there might be a better way to accomplish
knowSuggestions?
It appears the collection is the shopping cart for one user. Since you
you will want a tally of the individual items ordered, why not keep a listof
distinct items, instead of the line item scenareo. If they scan the sameitem
twice, it increments that item, rather than creating a new line item.etc...
ordered.
When you return the Count, it should be the sum total of all items
There would be no need for the countNumberID function because everyavailable.
different item would have its 'quantity ordered' already stored, easily
LFS
.
- Follow-Ups:
- Re: Collection Class object enhancements
- From: Larry Serflaten
- Re: Collection Class object enhancements
- References:
- Collection Class object enhancements
- From: wb
- Re: Collection Class object enhancements
- From: Larry Serflaten
- Collection Class object enhancements
- Prev by Date: Re: Browse and Select List of Folders
- Next by Date: Re: MDI form title bar doesn't focus
- Previous by thread: Re: Collection Class object enhancements
- Next by thread: Re: Collection Class object enhancements
- Index(es):
Loading