Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
GeneralRe: Painting Issue Pin
S. Senthil Kumar12-Apr-05 3:26
S. Senthil Kumar12-Apr-05 3:26 
Generalcreating code demo Pin
rmedo12-Apr-05 1:56
rmedo12-Apr-05 1:56 
GeneralRe: creating code demo Pin
eggie512-Apr-05 13:58
eggie512-Apr-05 13:58 
GeneralRe: creating code demo Pin
rmedo13-Apr-05 4:34
rmedo13-Apr-05 4:34 
GeneralC# & XML & nested loops problem (try 2) Pin
Anonymous12-Apr-05 1:47
Anonymous12-Apr-05 1:47 
GeneralRe: C# & XML & nested loops problem (try 2) Pin
hooray12-Apr-05 2:11
hooray12-Apr-05 2:11 
GeneralRe: C# & XML & nested loops problem (try 2) Pin
Anonymous12-Apr-05 2:38
Anonymous12-Apr-05 2:38 
GeneralC# & XML & nested loops problem Pin
Anonymous12-Apr-05 1:45
Anonymous12-Apr-05 1:45 
Hello,

I'm working on a C# console program.
Now I've encountered the following problem:

I read data from a MS-SQL database and create Article objects with this data (own class).
An Article object exists out of the following members: custIDa, custIDb, docID, accountNr,

tCode, tTarif, VAT.

A customer can have multiple articles (so when custIDa is for example 1 it can have docID =

1 and docID = 2 (so 2 articles)).

I add every Article object to an ArrayList (and maybe I'll sort it).

What I want to accomplish is the following:

I want to run through the ArrayList and write the Article-data to XML like this:

<rootnode>
<customer ida="1" idb="UX200">

<accountnr value="453-2513-564">
<br />
			<tarif value="5"><br />
			<vat value="250"><br />
<br />
<br />
	<customer ida="2" idb="BF500"><br />
		<br />
			<accountnr value="456-5465-546"><br />
			<code><br />
			<tarif value="2"><br />
			<vat value="120"><br />
<br />
		<br />
			<accountnr value="456-5465-546"><br />
			<code><br />
			<tarif value="2"><br />
			<vat value="568"><br />
<br />
<code><br />
<code><code><br />
<br />
I think I'll have to do this with a nested loop, 1 to check if custIDa is the same or has <br />
<br />
changed and one for the docID's.<br />
<br />
So custIDa can occur multiple times with everytime a changed docID (you could state that <br />
<br />
it's a combined primary key as in SQL).<br />
<br />
Anyone can help me out with this or has any ideas to help me out 'cause I'm really stuck <br />
<br />
here :(<br />
<br />
Thanks in advance!<br />
<br />
PS: Sorry for my English, I'm from Belgium ;)

GeneralRe: C# &amp; XML &amp; nested loops problem Pin
Ian Bowler12-Apr-05 7:45
Ian Bowler12-Apr-05 7:45 
GeneralRe: C# &amp; XML &amp; nested loops problem Pin
Anonymous12-Apr-05 23:31
Anonymous12-Apr-05 23:31 
GeneralProb with creating user control Pin
Anonymous12-Apr-05 1:03
Anonymous12-Apr-05 1:03 
GeneralRe: Prob with creating user control Pin
Judah Gabriel Himango12-Apr-05 4:38
sponsorJudah Gabriel Himango12-Apr-05 4:38 
Generalon Signed Assemblies in .Net Pin
ppp00112-Apr-05 0:29
ppp00112-Apr-05 0:29 
GeneralThreading.Timer callback called multiple times Pin
sjhart12-Apr-05 0:23
sjhart12-Apr-05 0:23 
GeneralRe: Threading.Timer callback called multiple times Pin
Mike Dimmick12-Apr-05 2:43
Mike Dimmick12-Apr-05 2:43 
GeneralRe: Threading.Timer callback called multiple times Pin
sjhart12-Apr-05 3:05
sjhart12-Apr-05 3:05 
GeneralC#, COM &amp; Type Libraries Pin
MrEyes12-Apr-05 0:13
MrEyes12-Apr-05 0:13 
Questionhow to send http streams in c# Pin
arusmemon11-Apr-05 23:53
arusmemon11-Apr-05 23:53 
AnswerRe: how to send http streams in c# Pin
Claudio Grazioli12-Apr-05 3:05
Claudio Grazioli12-Apr-05 3:05 
GeneralRe: Setting file attributes Pin
hooray12-Apr-05 1:10
hooray12-Apr-05 1:10 
GeneralUnsafe code on a webserver - 2bpp images Pin
Mark Otway11-Apr-05 23:39
Mark Otway11-Apr-05 23:39 
GeneralRe: Unsafe code on a webserver - 2bpp images Pin
Mark Otway12-Apr-05 20:38
Mark Otway12-Apr-05 20:38 
GeneralError in DataBinding after DataSet.Clear() Pin
Vexta11-Apr-05 21:47
Vexta11-Apr-05 21:47 
GeneralCheckbox Controls in a form Pin
Billy Whizz11-Apr-05 21:02
Billy Whizz11-Apr-05 21:02 
GeneralRe: Checkbox Controls in a form Pin
Dave Kreskowiak12-Apr-05 7:02
mveDave Kreskowiak12-Apr-05 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.