statefacade.vb

来自「使用Access数据库演示的任务分配管理程序 一个使用ADO.NET基于」· VB 代码 · 共 88 行

VB
88
字号
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.42
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports Common.Business
Imports Database.DataAccess
Imports System
Imports System.Collections
Imports System.Text

'*************************************************************
' Class Name:  StateFacade
' Purpose:  A pattern class that represents an entire subsystem.
' Description: 
'***************************************************************
Namespace Database
    
    <Serializable()>  _
    Public Class StateFacade
        
        Private m_StateDAO As StateDAO = New StateDAO
        
        Public Sub New()
            MyBase.New
            Me.InitializeClass
        End Sub
        
        Private Sub InitializeClass()
        End Sub
        
        Function GetState(ByVal StateID As Integer) As State
            ' TODO: add security here...
            Dim biz As State = m_StateDAO.GetByPrimaryKey(StateID)
            Return biz
        End Function
        
        Function GetStateArrayWhere(ByVal sql As String) As State()
            ' TODO: add security here...
            Return m_StateDAO.GetStatesWhere(sql)
        End Function
        
        Function GetStateTableWhere(ByVal sql As String) As System.Data.DataTable
            ' TODO: add security here...
            Return m_StateDAO.GetStatesTableWhere(sql)
        End Function
        
        Function GetStatesWhere(ByVal args() As Object) As System.Collections.ArrayList
            ' TODO: add security here...
            Return m_StateDAO.GetStatesWhere(args)
        End Function
        
        Function GetStatesWhereAndAlso(ByVal args() As Object) As System.Collections.ArrayList
            ' TODO: add security here...
            Return m_StateDAO.GetStatesWhereAndAlso(args)
        End Function
        
        Function InsertState(ByVal biz As State) As Integer
            ' TODO: add security here...
            Return m_StateDAO.Insert(biz)
        End Function
        
        Sub UpdateState(ByVal biz As State)
            ' TODO: add security here...
            m_StateDAO.Update(biz)
        End Sub
        
        Sub DeleteState(ByVal ID As Integer)
            ' TODO: add security here...
            m_StateDAO.Delete(ID)
        End Sub
        
        Function GetAllStates() As System.Collections.ArrayList
            ' TODO: add security here...
            Dim States As System.Collections.ArrayList = m_StateDAO.GetAllStates
            Return States
        End Function
    End Class
End Namespace

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?