Hello,
I am new to the using CSLA and need some help. My requirement is i have to open cursor from database and going through the loop i need to generate a file (.xls) and show the link on .aspx page to download/open the file. I am using VS 2008 with CSLA. Can someone guide me how should i start with. Thanks.
CSLA does not have ability to create XLS files. You will
need a third part product to do so programmatically or use Excel.Application
(not good). I think, ComponentOne has .NET excel library. In any
case, create CSLA read-only base and read-only list base classes, populate them
from data reader, then loop through items in the list, populating data in Excel
spreadsheet.
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: vijay
[mailto:cslanet@lhotka.net]
Sent: Thursday, April 10, 2008 12:47 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Generate Text File
Hello,
I am new to the using CSLA and need some help. My requirement is i have to
open cursor from database and going through the loop i need to generate a file
(.xls) and show the link on .aspx page to download/open the file. I am using VS
2008 with CSLA. Can someone guide me how should i start with. Thanks.
Thanks Sergery for your reply.
So what i understand is, i have to follow these steps to generate a text file:
1. I have to open the cursor and write to the file do i need to create object for ReadOnlyChile. Can't I pass SafeDataReader to application from ReadOnlyListBase. Would it possible if you can provide some code or link where this is implemented.
2. On same screen i need to open 14 different cursors and generate the file. Is there any way so that i can resuse the objects or i need to create seperately for all cursors. Thanks.
1.
You can create ReadOnlyList and use data reader to populate
it. Then you can scroll through the list, writing data to a file.
2.
If files contain different data, you need to create a separate
ReadOnlyList for each one and use different command to populate it with data.
Depending on requirements, I am not sure if you need the
ReadOnlyList or you can just use custom objects to write the data out
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: vijay
[mailto:cslanet@lhotka.net]
Sent: Saturday, April 12, 2008 8:17 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: Generate Text File
Thanks Sergery for your reply.
So what i understand is, i have to follow these steps to generate a text
file:
1. I have to open the cursor and write to the file do i need to create
object for ReadOnlyChile. Can't I pass SafeDataReader to application from
ReadOnlyListBase. Would it possible if you can provide some code or link
where this is implemented.
2. On same screen i need to open 14 different cursors and generate the file.
Is there any way so that i can resuse the objects or i need to create
seperately for all cursors. Thanks.
Copyright (c) Marimer LLC