wbltimesheets.vb
来自「Beginning VB.NET DatabasesAll_Code.rar」· VB 代码 · 共 43 行
VB
43 行
Public Class WBLTimeSheets
Implements IDisposable
#Region " Class Level Variables "
Private objWDATimeSheets As WroxDataAccess.WDATimeSheets
#End Region
#Region " Constructor and Destructor "
Public Sub New(ByVal Company As String, ByVal Application As String)
objWDATimeSheets = New WroxDataAccess.WDATimeSheets(Company, Application)
End Sub
Public Sub Dispose() Implements System.IDisposable.Dispose
objWDATimeSheets.Dispose()
objWDATimeSheets = Nothing
End Sub
#End Region
#Region " Public TimeSheet Functions "
Public Function GetTimeSheet(ByVal UserID As Guid, _
ByVal WeekEndingDate As Date) As DataSet
Try
'Call the data component to get a user timesheet
GetTimeSheet = objWDATimeSheets.GetTimeSheet(UserID, WeekEndingDate)
Catch ExceptionErr As Exception
Throw New System.Exception(ExceptionErr.Message, _
ExceptionErr.InnerException)
End Try
End Function
Public Function AddTimeSheet(ByVal TimeSheet As DataSet) As Boolean
Try
'Call the data component to add the new group
Return objWDATimeSheets.AddTimeSheet(TimeSheet)
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 + =
减小字号Ctrl + -
显示快捷键?