What Generator made this code?

G

GaryDean

I have inherrited an undocumented asp.net 1.1 application that contains a
subproject with about 85 .vb modules that look like they are generated from
some kind of data layering tool such as codesmith. I've pasted part of one
of the modules below. Does anyone recognize this coding convention? I'm
trying to figure out which generator was used so I can go get it to maintain
the app.
--
Regards,
Gary Blakely

'the comments were removed
Option Compare Text
Option Explicit On
Option Strict On

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports System.Diagnostics
Imports Bfast.DataProvider

Public Class PayPeriodTypeDataAdapter
Inherits BaseDataAdapter

#Region "Constructors"
Public Sub New(ByVal usage As DATA_ADAPTER_USAGE)
MyBase.New()
'selects are programmed at fill
With localDataAdapter
.InsertCommand = CreateInsertCommand(localConnection)
.UpdateCommand = CreateUpdateCommand(localConnection)

Select Case usage 'This is used to determin delete methods
Case DATA_ADAPTER_USAGE.DAU_DEFAULT
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_FRANCHISE
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_ADMINISTRATION
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_MAINTAINANCE
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_CUSTOMER
.DeleteCommand = CreateDeleteCommand(localconnection)
End Select
End With
End Sub

Public Sub New()
MyBase.New()
'selects are programmed at fill
With localDataAdapter
.InsertCommand = CreateInsertCommand(localConnection)
.UpdateCommand = CreateUpdateCommand(localConnection)

'Code for DATA_ADAPTER_USAGE.DAU_DEFAULT
.DeleteCommand = CreateDeleteCommand(localconnection)
End With
End Sub

Public Sub ChangeUsage(ByVal Usage As DATA_ADAPTER_USAGE)
With localDataAdapter
Dim tempcommand As SqlCommand = CreateInsertCommand(localConnection)
Select Case Usage 'This is used to determin delete methods
Case DATA_ADAPTER_USAGE.DAU_DEFAULT
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_FRANCHISE
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_ADMINISTRATION
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_MAINTAINANCE
.DeleteCommand = CreateDeleteCommand(localconnection)
Case DATA_ADAPTER_USAGE.DAU_CUSTOMER
.DeleteCommand = CreateDeleteCommand(localconnection)
End Select
End With
End Sub
#End Region

#Region "Common Functions"
#Region "- Fill"
Public Overloads Overrides Function Fill(ByRef dataSet As DataSet) As
Integer
localDataAdapter.SelectCommand = CreateSelectCommand(localConnection)
Return LocalDataAdapter.Fill(dataSet)
End Function
Public Overloads Overrides Function Fill(ByRef dataSet As DataSet, ByVal
tableName As String) As Integer
localDataAdapter.SelectCommand = CreateSelectCommand(localConnection)
Return LocalDataAdapter.Fill(dataSet, tableName)
End Function
 
S

Steven Cheng[MSFT]

G

GaryDean

Steven,
I'll check that out. That's help above and beyond the call.
Thank you very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top