trying to use LineItem.Item in C#
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
trying to use LineItem.Item in C#

 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server
Author Message
cbuda
Guest





Posted: Thu Dec 23, 2004 10:45 pm    Post subject: trying to use LineItem.Item in C# Reply with quote

I am trying to add some custom attributes to a new line item using Item
attribute of LineItem but it Item does not seem to be available. The odd
thing is that I seem to only have the problem in c#. I tested the same thing
out in a VB.Net control and was able to see the Item attribute. Any idea why
this may be happening? I need to get this working in C# because I have an
existing C# control that needs to have this logic. If this is not possible,
is there any other way to accomplish this (adding customer attributes to a
line).

Thanks
Back to top
David Messner [MSFT]
Guest





Posted: Tue Dec 28, 2004 2:39 pm    Post subject: RE: trying to use LineItem.Item in C# Reply with quote

I'm not clear on what you mean by an "attribute" in this context. But at
any rate, the LineItem class has an indexer in C#

lineItem["myPropertyName"] = <value>;

If you want this stored in a separate DB column for baskets/orders, you'll
need to create the column in your DB matching this property name, otherwise
it will be stored in the marshalled_data column.

-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation. All rights
reserved.

--------------------
Thread-Topic: trying to use LineItem.Item in C#
thread-index: AcTpDsAjBJSHTqQqQ0SnX6m0wCbgPg==
X-WBNR-Posting-Host: 65.217.204.139
From: "=?Utf-8?B?Y2J1ZGE=?=" <cbuda@discussions.microsoft.com>
Subject: trying to use LineItem.Item in C#
Date: Thu, 23 Dec 2004 08:45:03 -0800
Lines: 10
Message-ID: <79CB4778-3133-407F-9975-759A4F38E05B@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15299
X-Tomcat-NG: microsoft.public.commerceserver.general

I am trying to add some custom attributes to a new line item using Item
attribute of LineItem but it Item does not seem to be available. The odd
thing is that I seem to only have the problem in c#. I tested the same
thing
out in a VB.Net control and was able to see the Item attribute. Any idea
why
this may be happening? I need to get this working in C# because I have an
existing C# control that needs to have this logic. If this is not
possible,
is there any other way to accomplish this (adding customer attributes to a
line).

Thanks
Back to top
cbuda
Guest





Posted: Wed Jan 05, 2005 1:17 am    Post subject: RE: trying to use LineItem.Item in C# Reply with quote

Thanks, that is exactly what I was looking for

"David Messner [MSFT]" wrote:

Quote:
I'm not clear on what you mean by an "attribute" in this context. But at
any rate, the LineItem class has an indexer in C#

lineItem["myPropertyName"] = <value>;

If you want this stored in a separate DB column for baskets/orders, you'll
need to create the column in your DB matching this property name, otherwise
it will be stored in the marshalled_data column.

-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation. All rights
reserved.

--------------------
Thread-Topic: trying to use LineItem.Item in C#
thread-index: AcTpDsAjBJSHTqQqQ0SnX6m0wCbgPg==
X-WBNR-Posting-Host: 65.217.204.139
From: "=?Utf-8?B?Y2J1ZGE=?=" <cbuda@discussions.microsoft.com
Subject: trying to use LineItem.Item in C#
Date: Thu, 23 Dec 2004 08:45:03 -0800
Lines: 10
Message-ID: <79CB4778-3133-407F-9975-759A4F38E05B@microsoft.com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15299
X-Tomcat-NG: microsoft.public.commerceserver.general

I am trying to add some custom attributes to a new line item using Item
attribute of LineItem but it Item does not seem to be available. The odd
thing is that I seem to only have the problem in c#. I tested the same
thing
out in a VB.Net control and was able to see the Item attribute. Any idea
why
this may be happening? I need to get this working in C# because I have an
existing C# control that needs to have this logic. If this is not
possible,
is there any other way to accomplish this (adding customer attributes to a
line).

Thanks
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB