G
Guest
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!
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!