Commerce Server General - trying to use LineItem.Item in C#

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > January 2005 > trying to use LineItem.Item in C#





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author trying to use LineItem.Item in C#
cbuda

2004-12-23, 5:51 pm

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
David Messner [MSFT]

2004-12-28, 2:49 am

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

cbuda

2005-01-04, 5:56 pm

Thanks, that is exactly what I was looking for

"David Messner [MSFT]" wrote:

> 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
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com