⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wbltimesheets.vb

📁 Beginning VB.NET DatabasesAll_Code.rar
💻 VB
字号:
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

    Public Function SaveTimeSheet(ByVal TimeSheet As DataSet) As Boolean
        Try
            'Call the data component to save the timesheet
            Return objWDATimeSheets.SaveTimeSheet(TimeSheet)
        Catch ExceptionErr As Exception
            Throw New System.Exception(ExceptionErr.Message, _
             ExceptionErr.InnerException)
        End Try
    End Function

    Public Function SubmitTimeSheet(ByVal TimeSheetID As Guid) As Boolean
        Try
            'Call the data component to submit the timesheet
            Return objWDATimeSheets.SubmitTimeSheet(TimeSheetID)
        Catch ExceptionErr As Exception
            Throw New System.Exception(ExceptionErr.Message, _
             ExceptionErr.InnerException)
        End Try
    End Function

    Public Function ApproveTimeSheet(ByVal TimeSheetID As Guid, _
        ByVal ManagerID As Guid) As Boolean
        Try
            'Call the data component to approve the timesheet
            Return objWDATimeSheets.ApproveTimeSheet(TimeSheetID, ManagerID)
        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 + -