Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Catalog > Cast CatalogIte...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 750 of 763
Post > Topic >>

Cast CatalogItem to Product

by bthubbard <Brandon.Hubbard@[EMAIL PROTECTED] > Jul 12, 2007 at 11:35 AM

Rather quick question.
I have conducted a search in Commerce server and now have a
CatalogItemsDataSet.  I have tried to iterate through the collection
of CatalogItems via a foreach as so and cast each CatalogItem to a
Commerce Server product as so:
foreach(CatalogItemsDataSet.CatalogItem item in
ACatalogDS.CatalogItems)
{
// Code here to make sure the item is a product,,,,then,,,
                    Microsoft.CommerceServer.Catalog.Product
tempProduct = (Microsoft.CommerceServer.Catalog.Product)item;
This unfortunatly results in the following compile error : " Error	87
Cannot implicitly convert type
'Microsoft.CommerceServer.Catalog.CatalogItemsDataSet.CatalogItem' to
'Microsoft.CommerceServer.Catalog.Product'"
I have searched around a bit but have not yet found a quick fix.
Thanks.
 




 1 Posts in Topic:
Cast CatalogItem to Product
bthubbard <Brandon.Hub  2007-07-12 11:35:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:06:12 CST 2008.