What Generator made this code?

Discussion in 'ASP .Net' started by GaryDean, Dec 20, 2006.

  1. GaryDean

    GaryDean Guest

    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
     
    GaryDean, Dec 20, 2006
    #1
    1. Advertising

  2. Steven Cheng[MSFT], Dec 21, 2006
    #2
    1. Advertising

  3. GaryDean

    GaryDean Guest

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

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hello Gary,
    >
    > After a general overview upon the code you provided, it should be
    > generated
    > by some Data Access generator(such as O/R mapping). I've searched the web
    > based on some of the keywords in it, seems the following one(named
    > "codus")
    > looks abit similar:
    >
    > http://davidhayden.com/blog/dave/archive/2005/05/11/1014.aspx
    >
    > http://www.adapdev.com/codus/index.aspx
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
     
    GaryDean, Dec 21, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Maurer
    Replies:
    3
    Views:
    4,949
    Peter
    Apr 19, 2006
  2. TheDustbustr
    Replies:
    1
    Views:
    474
    Sami Hangaslammi
    Jul 25, 2003
  3. Replies:
    9
    Views:
    567
  4. Chris Withers

    Problems with email.Generator.Generator

    Chris Withers, Sep 11, 2006, in forum: Python
    Replies:
    20
    Views:
    1,731
    Max M
    Sep 12, 2006
  5. Terry Reedy

    Generator functions subclass generator?

    Terry Reedy, Jun 18, 2009, in forum: Python
    Replies:
    0
    Views:
    483
    Terry Reedy
    Jun 18, 2009
Loading...

Share This Page