I have a fully functional web app that I created in Visual Studio 2003.
I've even managed to translate it to a functional working 2005 version.
What are the best steps to creating a Windows based form version in a manner
that I can preserve a lot of the routines that I have written?
For example, I have a connection string in a WebConfig file that I refer to
in my Data Access Layer. I didn't use the graphical objects to do this, I
wrote most of the code and I would like to use this setup to take a lot of
business logic along for the ride:
For example, this routine fils a DataGrid on a Patient Screen with Lab results
Public Shared Function GetLabs (ByVal lMRN as integer) as dataset
Dim conMembers as SqlConnection = GetMembershipConnection()
Dim strLabsSQL as string
strLabSQL = "SELECT Proc_Name as [Lab Procedure], Comp_Name " _
& "as Component, Result " _
& "FROM tbl_Lab " _
& "WHERE MRN = @MRN " _
& "ORDER BY Result_Date desc"
Dim cmdGetLab as new sqlCommand(strLabSQL, conMembers)
cmdGetLab.CommandType = CommandType.text
Dim daLab as New SqlDataAdapter
daLab.SelectCommand = cmdGetLab
Return dsLab
End Function
'=============================
I know there are new graphical ways to do this, but to save time, I would
like to use the types of tools I have already created, and not spend time
trying to learn about a more simple redesign using the new graphical tools.
Unless their is a simple way of illustrating how I could change the above
sample. The majority of my tools are setup this way. We are trying to
quickly migrate into a stand-alone desktop version which connects to a
subscribed replicated SQL Express version.
A replacement for my connection reference in WebConfig setup using the
AppConfig tool would be very valuable. Thanks!
Bob Powell [MVP] - 15 Aug 2006 08:49 GMT
If you've been sensible about decoupling the data access layer from the
graphics you should be ok. There's not much yo can do to directly translate
the web app into a Windows Forms application but reuse of the DAL is
defeinitely possible.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
>I have a fully functional web app that I created in Visual Studio 2003.
> I've even managed to translate it to a functional working 2005 version.
[quoted text clipped - 45 lines]
> A replacement for my connection reference in WebConfig setup using the
> AppConfig tool would be very valuable. Thanks!