📄 wblgroups.vb
字号:
Public Class WBLGroups
Implements IDisposable
#Region " Class Level Variables "
Private objWDAGroups As WroxDataAccess.WDAGroups
#End Region
#Region " Constructor and Destructor "
Public Sub New(ByVal Company As String, ByVal Application As String)
objWDAGroups = New WroxDataAccess.WDAGroups(Company, Application)
End Sub
Public Sub Dispose() Implements System.IDisposable.Dispose
objWDAGroups.Dispose()
objWDAGroups = Nothing
End Sub
#End Region
#Region " Public Group Functions "
Public Function GetGroups() As DataSet
Try
'Call the data component to get all groups
GetGroups = objWDAGroups.GetGroups
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function GetGroup(ByVal GroupID As Guid) As DataSet
Try
'Call the data component to get a specific group
GetGroup = objWDAGroups.GetGroup(GroupID)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function GetNewGroupDS() As DataSet
Try
'Return the Group schema as a DataSet
GetNewGroupDS = New Group
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function AddGroup(ByVal Group As DataSet) As Boolean
Try
'Call the data component to add the new group
Return objWDAGroups.AddGroup(Group)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function UpdateGroup(ByVal Group As DataSet) As Boolean
Try
'Call the data component to update the group
Return objWDAGroups.UpdateGroup(Group)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function DeleteGroup(ByVal GroupID As Guid) As Boolean
Try
'Call the data component to delete the group
Return objWDAGroups.DeleteGroup(GroupID)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
#End Region
#Region " Public Group Projects Functions "
Public Function GetGroupProjects(ByVal GroupID As Guid) As DataSet
Try
'Call the data component to get all group projects
GetGroupProjects = objWDAGroups.GetGroupProjects(GroupID)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function GetNewGroupProjectsDS() As DataSet
Try
'Return the GroupProjects schema as a DataSet
GetNewGroupProjectsDS = New GroupProjects
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function AddGroupProjects(ByVal GroupProjects As DataSet) As Boolean
Try
'Call the data component to add the group projects
Return objWDAGroups.AddGroupProjects(GroupProjects)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function DeleteGroupProjects(ByVal GroupID As Guid) As Boolean
Try
'Call the data component to delete the group projects
Return objWDAGroups.DeleteGroupProjects(GroupID)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
#End Region
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -