OT: Data Output
Old forum URL: forums.lhotka.net/forums/t/7546.aspx
whelzer posted on Tuesday, September 01, 2009
We have the following issue.
Using VB 2008/Windows Forms/CSLA 3.6.2 (but 99% of our code was done under 3.0.4 - in fact we're still using the older templpates and have just started exploring the newer stuff).
I need to produce some "odd" files from DP_Insert & _update
Assuming I had an object like this:
private _Id as integer
private _DOB as date
private _address as string
private _cusName as string
The resulting file from DP_update would be this:
Header Stuff
1
2351 'the property_Id
2
John Doe ' the property _cusName
3
125 My Street ' the propety _Address
4
01/01/1974 ' yes _dob
and so on
In DP_Insert the resulting file is similar but crucially different
Header Stuff
2352
Jane Doe
111 A Road
02/02/1978
Basically the order in the "insert file" must be conistent with the actual numbers on the "update" file.
Ideally I'd like to do something like the following:
1) Associate a number with each property"
2) Protected Overrides Sub DataPortal_Update()
output header stuff
loop through properties in Me order by associated number
output property number
output property value
end loop
output footer stuff
End Sub
DP_Insert would be very similar.
Any ideas would be much appreciated.
FYI - the insert and update files are for feeding a 1970s DOS based Banking System!
Copyright (c) Marimer LLC