home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
66.142.0.142
/
66.142.0.142.tar
/
66.142.0.142
/
tblEmployeesview.aspx.vb
< prev
next >
Wrap
Text File
|
2012-01-28
|
24KB
|
772 lines
Imports System.Data
Imports System.Data.Common
Imports System.Xml
Imports System.IO
Imports System.Data.OleDb
'
' ASP.NET code-behind class (Page)
'
Partial Class tblEmployeesview
Inherits AspNetMaker7_tfpssnet
' Page object
Public tblEmployees_view As ctblEmployees_view
'
' Page Class
'
Class ctblEmployees_view
Inherits AspNetMakerPage
Implements IDisposable
' Used by system generated functions
Private RsWrk As Object, sSqlWrk As String, sWhereWrk As String
Private arwrk As Object
Private armultiwrk() As String
' Page URL
Public ReadOnly Property PageUrl() As String
Get
Dim Url As String = ew_CurrentPage() & "?"
If tblEmployees.UseTokenInUrl Then Url = Url & "t=" & tblEmployees.TableVar & "&" ' Add page token
Return Url
End Get
End Property
' Validate page request
Public Function IsPageRequest() As Boolean
Dim Result As Boolean
If tblEmployees.UseTokenInUrl Then
Result = False
If ObjForm IsNot Nothing Then
Result = (tblEmployees.TableVar = ObjForm.GetValue("t"))
End If
If ew_Get("t") <> "" Then
Result = (tblEmployees.TableVar = ew_Get("t"))
End If
Return Result
End If
Return True
End Function
' tblEmployees
Public Property tblEmployees() As ctblEmployees
Get
Return ParentPage.tblEmployees
End Get
Set(ByVal v As ctblEmployees)
ParentPage.tblEmployees = v
End Set
End Property
'
' Constructor
' - init objects
' - open connection
'
Public Sub New(ByRef APage As AspNetMaker7_tfpssnet)
m_ParentPage = APage
m_Page = Me
m_PageID = "view"
m_PageObjName = "tblEmployees_view"
m_PageObjTypeName = "ctblEmployees_view"
' Table Name
m_TableName = "tblEmployees"
' Initialize table object
tblEmployees = New ctblEmployees(Me)
' Connect to database
Conn = New cConnection()
End Sub
'
' Subroutine Page_Init
' - called before page main
' - check Security
' - set up response header
' - call page load events
'
Public Sub Page_Init()
Security = New cAdvancedSecurity(Me)
If Not Security.IsLoggedIn() Then Security.AutoLogin()
If Not Security.IsLoggedIn() Then
Security.SaveLastUrl()
Page_Terminate("login.aspx")
End If
' Table Permission loading event
Security.TablePermission_Loading()
Security.LoadCurrentUserLevel(TableName)
' Table Permission loaded event
Security.TablePermission_Loaded()
If Not Security.CanView Then
Security.SaveLastUrl()
Page_Terminate("tblEmployeeslist.aspx")
End If
' User ID loading event
Security.UserID_Loading()
If Security.IsLoggedIn() Then Call Security.LoadUserID()
' User ID loaded event
Security.UserID_Loaded()
If Security.IsLoggedIn() And ew_Empty(Security.CurrentUserID) Then
Message = "You do not have the right permission to view the page"
Page_Terminate("tblEmployeeslist.aspx")
End If
' Global page loading event (in ewglobal*.vb)
ParentPage.Page_Loading()
' Page load event, used in current page
Page_Load()
End Sub
'
' Class terminate
' - clean up page object
'
Public Sub Dispose() Implements IDisposable.Dispose
Page_Terminate("")
End Sub
'
' Sub Page_Terminate
' - called when exit page
' - clean up connection and objects
' - if URL specified, redirect to URL
'
Sub Page_Terminate(url As String)
' Page unload event, used in current page
Page_Unload()
' Global page unloaded event (in ewglobal*.vb)
ParentPage.Page_Unloaded()
' Close connection
Conn.Dispose()
Security = Nothing
tblEmployees.Dispose()
' Go to URL if specified
If url <> "" Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.Redirect(url)
End If
End Sub
Public lDisplayRecs As Integer ' Number of display records
Public lStartRec As Integer, lStopRec As Integer, lTotalRecs As Integer, lRecRange As Integer
Public lRecCnt As Integer
Public sSrchWhere As String
'
' Page main processing
'
Sub Page_Main()
Dim sReturnUrl As String = ""
Dim bMatchRecord As Boolean = False
If IsPageRequest Then ' Validate request
If ew_Get("empID") <> "" Then
tblEmployees.empID.QueryStringValue = ew_Get("empID")
Else
sReturnUrl = "tblEmployeeslist.aspx" ' Return to list
End If
' Get action
tblEmployees.CurrentAction = "I" ' Display form
Select Case tblEmployees.CurrentAction
Case "I" ' Get a record to display
If Not LoadRow() Then ' Load record based on key
Message = "No records found" ' Set no record message
sReturnUrl = "tblEmployeeslist.aspx" ' No matching record, return to list
End If
End Select
Else
sReturnUrl = "tblEmployeeslist.aspx" ' Not page request, return to list
End If
If sReturnUrl <> "" Then Page_Terminate(sReturnUrl)
' Render row
tblEmployees.RowType = EW_ROWTYPE_VIEW
RenderRow()
End Sub
Public Pager As Object
'
' Set up Starting Record parameters
'
Sub SetUpStartRec()
Dim nPageNo As Integer
' Exit if lDisplayRecs = 0
If lDisplayRecs = 0 Then Exit Sub
If IsPageRequest Then ' Validate request
' Check for a "start" parameter
If ew_Get(EW_TABLE_START_REC) <> "" AndAlso IsNumeric(ew_Get(EW_TABLE_START_REC)) Then
lStartRec = ew_ConvertToInt(ew_Get(EW_TABLE_START_REC))
tblEmployees.StartRecordNumber = lStartRec
ElseIf ew_Get(EW_TABLE_PAGE_NO) <> "" AndAlso IsNumeric(ew_Get(EW_TABLE_PAGE_NO)) Then
nPageNo = ew_ConvertToInt(ew_Get(EW_TABLE_PAGE_NO))
lStartRec = (nPageNo-1)*lDisplayRecs+1
If lStartRec <= 0 Then
lStartRec = 1
ElseIf lStartRec >= ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 Then
lStartRec = ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1
End If
tblEmployees.StartRecordNumber = lStartRec
End If
End If
lStartRec = tblEmployees.StartRecordNumber
' Check if correct start record counter
If lStartRec <= 0 Then ' Avoid invalid start record counter
lStartRec = 1 ' Reset start record counter
tblEmployees.StartRecordNumber = lStartRec
ElseIf lStartRec > lTotalRecs Then ' Avoid starting record > total records
lStartRec = ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 ' Point to last page first record
tblEmployees.StartRecordNumber = lStartRec
ElseIf (lStartRec-1) Mod lDisplayRecs <> 0 Then
lStartRec = ((lStartRec-1)\lDisplayRecs)*lDisplayRecs+1 ' Point to page boundary
tblEmployees.StartRecordNumber = lStartRec
End If
End Sub
'
' Load default values
'
Sub LoadDefaultValues()
End Sub
'
' Load row based on key values
'
Function LoadRow() As Boolean
Dim RsRow As OleDbDataReader
Dim sFilter As String = tblEmployees.KeyFilter
' Row Selecting event
tblEmployees.Row_Selecting(sFilter)
' Load SQL based on filter
tblEmployees.CurrentFilter = sFilter
Dim sSql As String = tblEmployees.SQL
' Write SQL for debug
If EW_DEBUG_ENABLED Then ew_Write(sSql)
Try
RsRow = Conn.GetTempDataReader(sSql)
If Not RsRow.Read() Then
Return False
Else
LoadRowValues(RsRow) ' Load row values
' Row Selected event
tblEmployees.Row_Selected(RsRow)
Return True
End If
Catch
If EW_DEBUG_ENABLED Then Throw
Return False
Finally
Conn.CloseTempDataReader()
End Try
End Function
'
' Load row values from recordset
'
Sub LoadRowValues(ByRef RsRow As OleDbDataReader)
tblEmployees.empID.DbValue = RsRow("empID")
tblEmployees.empPayrollNumber.DbValue = RsRow("empPayrollNumber")
tblEmployees.empUsername.DbValue = RsRow("empUsername")
tblEmployees.empName.DbValue = RsRow("empName")
tblEmployees.empFirstName.DbValue = RsRow("empFirstName")
tblEmployees.empLastName.DbValue = RsRow("empLastName")
tblEmployees.empAddress.DbValue = RsRow("empAddress")
tblEmployees.empCity.DbValue = RsRow("empCity")
tblEmployees.empState.DbValue = RsRow("empState")
tblEmployees.empZIP.DbValue = RsRow("empZIP")
tblEmployees.empPhone.DbValue = RsRow("empPhone")
tblEmployees.empStatusID.DbValue = RsRow("empStatusID")
tblEmployees.empStartDate.DbValue = RsRow("empStartDate")
tblEmployees.empPositionID.DbValue = RsRow("empPositionID")
tblEmployees.empRate.DbValue = RsRow("empRate")
tblEmployees.empLastRaiseDate.DbValue = RsRow("empLastRaiseDate")
tblEmployees.empLastRaiseAmount.DbValue = RsRow("empLastRaiseAmount")
tblEmployees.empEmail.DbValue = RsRow("empEmail")
tblEmployees.empLiftCert.DbValue = IIf(ew_ConvertToBool(RsRow("empLiftCert")), "1", "0")
tblEmployees.empForkCert.DbValue = IIf(ew_ConvertToBool(RsRow("empForkCert")), "1", "0")
tblEmployees.empDriveAuth.DbValue = IIf(ew_ConvertToBool(RsRow("empDriveAuth")), "1", "0")
tblEmployees.empTimeClock.DbValue = IIf(ew_ConvertToBool(RsRow("empTimeClock")), "1", "0")
tblEmployees.empUserPass.DbValue = RsRow("empUserPass")
tblEmployees.empUserLevel.DbValue = RsRow("empUserLevel")
End Sub
'
' Render row values based on field settings
'
Sub RenderRow()
' Row Rendering event
tblEmployees.Row_Rendering()
'
' Common render codes for all row types
'
' empID
tblEmployees.empID.CellCssStyle = ""
tblEmployees.empID.CellCssClass = ""
' empPayrollNumber
tblEmployees.empPayrollNumber.CellCssStyle = ""
tblEmployees.empPayrollNumber.CellCssClass = ""
' empUsername
tblEmployees.empUsername.CellCssStyle = ""
tblEmployees.empUsername.CellCssClass = ""
' empName
tblEmployees.empName.CellCssStyle = ""
tblEmployees.empName.CellCssClass = ""
' empFirstName
tblEmployees.empFirstName.CellCssStyle = ""
tblEmployees.empFirstName.CellCssClass = ""
' empLastName
tblEmployees.empLastName.CellCssStyle = ""
tblEmployees.empLastName.CellCssClass = ""
' empAddress
tblEmployees.empAddress.CellCssStyle = ""
tblEmployees.empAddress.CellCssClass = ""
' empCity
tblEmployees.empCity.CellCssStyle = ""
tblEmployees.empCity.CellCssClass = ""
' empState
tblEmployees.empState.CellCssStyle = ""
tblEmployees.empState.CellCssClass = ""
' empZIP
tblEmployees.empZIP.CellCssStyle = ""
tblEmployees.empZIP.CellCssClass = ""
' empPhone
tblEmployees.empPhone.CellCssStyle = ""
tblEmployees.empPhone.CellCssClass = ""
' empStatusID
tblEmployees.empStatusID.CellCssStyle = ""
tblEmployees.empStatusID.CellCssClass = ""
' empStartDate
tblEmployees.empStartDate.CellCssStyle = ""
tblEmployees.empStartDate.CellCssClass = ""
' empPositionID
tblEmployees.empPositionID.CellCssStyle = ""
tblEmployees.empPositionID.CellCssClass = ""
' empRate
tblEmployees.empRate.CellCssStyle = ""
tblEmployees.empRate.CellCssClass = ""
' empLastRaiseDate
tblEmployees.empLastRaiseDate.CellCssStyle = ""
tblEmployees.empLastRaiseDate.CellCssClass = ""
' empLastRaiseAmount
tblEmployees.empLastRaiseAmount.CellCssStyle = ""
tblEmployees.empLastRaiseAmount.CellCssClass = ""
' empEmail
tblEmployees.empEmail.CellCssStyle = ""
tblEmployees.empEmail.CellCssClass = ""
' empLiftCert
tblEmployees.empLiftCert.CellCssStyle = ""
tblEmployees.empLiftCert.CellCssClass = ""
' empForkCert
tblEmployees.empForkCert.CellCssStyle = ""
tblEmployees.empForkCert.CellCssClass = ""
' empDriveAuth
tblEmployees.empDriveAuth.CellCssStyle = ""
tblEmployees.empDriveAuth.CellCssClass = ""
' empTimeClock
tblEmployees.empTimeClock.CellCssStyle = ""
tblEmployees.empTimeClock.CellCssClass = ""
' empUserPass
tblEmployees.empUserPass.CellCssStyle = ""
tblEmployees.empUserPass.CellCssClass = ""
' empUserLevel
tblEmployees.empUserLevel.CellCssStyle = ""
tblEmployees.empUserLevel.CellCssClass = ""
'
' View Row
'
If tblEmployees.RowType = EW_ROWTYPE_VIEW Then ' View row
' empID
tblEmployees.empID.ViewValue = tblEmployees.empID.CurrentValue
tblEmployees.empID.CssStyle = ""
tblEmployees.empID.CssClass = ""
tblEmployees.empID.ViewCustomAttributes = ""
' empPayrollNumber
tblEmployees.empPayrollNumber.ViewValue = tblEmployees.empPayrollNumber.CurrentValue
tblEmployees.empPayrollNumber.CssStyle = ""
tblEmployees.empPayrollNumber.CssClass = ""
tblEmployees.empPayrollNumber.ViewCustomAttributes = ""
' empUsername
tblEmployees.empUsername.ViewValue = tblEmployees.empUsername.CurrentValue
tblEmployees.empUsername.CssStyle = ""
tblEmployees.empUsername.CssClass = ""
tblEmployees.empUsername.ViewCustomAttributes = ""
' empName
tblEmployees.empName.ViewValue = tblEmployees.empName.CurrentValue
tblEmployees.empName.CssStyle = ""
tblEmployees.empName.CssClass = ""
tblEmployees.empName.ViewCustomAttributes = ""
' empFirstName
tblEmployees.empFirstName.ViewValue = tblEmployees.empFirstName.CurrentValue
tblEmployees.empFirstName.CssStyle = ""
tblEmployees.empFirstName.CssClass = ""
tblEmployees.empFirstName.ViewCustomAttributes = ""
' empLastName
tblEmployees.empLastName.ViewValue = tblEmployees.empLastName.CurrentValue
tblEmployees.empLastName.CssStyle = ""
tblEmployees.empLastName.CssClass = ""
tblEmployees.empLastName.ViewCustomAttributes = ""
' empAddress
tblEmployees.empAddress.ViewValue = tblEmployees.empAddress.CurrentValue
tblEmployees.empAddress.CssStyle = ""
tblEmployees.empAddress.CssClass = ""
tblEmployees.empAddress.ViewCustomAttributes = ""
' empCity
tblEmployees.empCity.ViewValue = tblEmployees.empCity.CurrentValue
tblEmployees.empCity.CssStyle = ""
tblEmployees.empCity.CssClass = ""
tblEmployees.empCity.ViewCustomAttributes = ""
' empState
tblEmployees.empState.ViewValue = tblEmployees.empState.CurrentValue
tblEmployees.empState.CssStyle = ""
tblEmployees.empState.CssClass = ""
tblEmployees.empState.ViewCustomAttributes = ""
' empZIP
tblEmployees.empZIP.ViewValue = tblEmployees.empZIP.CurrentValue
tblEmployees.empZIP.CssStyle = ""
tblEmployees.empZIP.CssClass = ""
tblEmployees.empZIP.ViewCustomAttributes = ""
' empPhone
tblEmployees.empPhone.ViewValue = tblEmployees.empPhone.CurrentValue
tblEmployees.empPhone.CssStyle = ""
tblEmployees.empPhone.CssClass = ""
tblEmployees.empPhone.ViewCustomAttributes = ""
' empStatusID
If ew_NotEmpty(tblEmployees.empStatusID.CurrentValue) Then
sSqlWrk = "SELECT [tscStatus] FROM [tblEmployeeStatus] WHERE [ID] = " & ew_AdjustSql(tblEmployees.empStatusID.CurrentValue) & ""
sSqlWrk = sSqlWrk & " ORDER BY [tscStatus] "
RsWrk = Conn.GetTempDataReader(sSqlWrk)
If RsWrk.Read() Then
tblEmployees.empStatusID.ViewValue = RsWrk("tscStatus")
Else
tblEmployees.empStatusID.ViewValue = tblEmployees.empStatusID.CurrentValue
End If
Conn.CloseTempDataReader()
Else
tblEmployees.empStatusID.ViewValue = System.DBNull.Value
End If
tblEmployees.empStatusID.CssStyle = ""
tblEmployees.empStatusID.CssClass = ""
tblEmployees.empStatusID.ViewCustomAttributes = ""
' empStartDate
tblEmployees.empStartDate.ViewValue = tblEmployees.empStartDate.CurrentValue
tblEmployees.empStartDate.ViewValue = ew_FormatDateTime(tblEmployees.empStartDate.ViewValue, 6)
tblEmployees.empStartDate.CssStyle = ""
tblEmployees.empStartDate.CssClass = ""
tblEmployees.empStartDate.ViewCustomAttributes = ""
' empPositionID
If ew_NotEmpty(tblEmployees.empPositionID.CurrentValue) Then
sSqlWrk = "SELECT [posDescription] FROM [tblPositions] WHERE [posID] = " & ew_AdjustSql(tblEmployees.empPositionID.CurrentValue) & ""
sSqlWrk = sSqlWrk & " ORDER BY [posDescription] "
RsWrk = Conn.GetTempDataReader(sSqlWrk)
If RsWrk.Read() Then
tblEmployees.empPositionID.ViewValue = RsWrk("posDescription")
Else
tblEmployees.empPositionID.ViewValue = tblEmployees.empPositionID.CurrentValue
End If
Conn.CloseTempDataReader()
Else
tblEmployees.empPositionID.ViewValue = System.DBNull.Value
End If
tblEmployees.empPositionID.CssStyle = ""
tblEmployees.empPositionID.CssClass = ""
tblEmployees.empPositionID.ViewCustomAttributes = ""
' empRate
tblEmployees.empRate.ViewValue = tblEmployees.empRate.CurrentValue
tblEmployees.empRate.CssStyle = ""
tblEmployees.empRate.CssClass = ""
tblEmployees.empRate.ViewCustomAttributes = ""
' empLastRaiseDate
tblEmployees.empLastRaiseDate.ViewValue = tblEmployees.empLastRaiseDate.CurrentValue
tblEmployees.empLastRaiseDate.ViewValue = ew_FormatDateTime(tblEmployees.empLastRaiseDate.ViewValue, 6)
tblEmployees.empLastRaiseDate.CssStyle = ""
tblEmployees.empLastRaiseDate.CssClass = ""
tblEmployees.empLastRaiseDate.ViewCustomAttributes = ""
' empLastRaiseAmount
tblEmployees.empLastRaiseAmount.ViewValue = tblEmployees.empLastRaiseAmount.CurrentValue
tblEmployees.empLastRaiseAmount.CssStyle = ""
tblEmployees.empLastRaiseAmount.CssClass = ""
tblEmployees.empLastRaiseAmount.ViewCustomAttributes = ""
' empEmail
tblEmployees.empEmail.ViewValue = tblEmployees.empEmail.CurrentValue
tblEmployees.empEmail.CssStyle = ""
tblEmployees.empEmail.CssClass = ""
tblEmployees.empEmail.ViewCustomAttributes = ""
' empLiftCert
If Convert.ToString(tblEmployees.empLiftCert.CurrentValue) = "1" Then
tblEmployees.empLiftCert.ViewValue = "Yes"
Else
tblEmployees.empLiftCert.ViewValue = "No"
End If
tblEmployees.empLiftCert.CssStyle = ""
tblEmployees.empLiftCert.CssClass = ""
tblEmployees.empLiftCert.ViewCustomAttributes = ""
' empForkCert
If Convert.ToString(tblEmployees.empForkCert.CurrentValue) = "1" Then
tblEmployees.empForkCert.ViewValue = "Yes"
Else
tblEmployees.empForkCert.ViewValue = "No"
End If
tblEmployees.empForkCert.CssStyle = ""
tblEmployees.empForkCert.CssClass = ""
tblEmployees.empForkCert.ViewCustomAttributes = ""
' empDriveAuth
If Convert.ToString(tblEmployees.empDriveAuth.CurrentValue) = "1" Then
tblEmployees.empDriveAuth.ViewValue = "Yes"
Else
tblEmployees.empDriveAuth.ViewValue = "No"
End If
tblEmployees.empDriveAuth.CssStyle = ""
tblEmployees.empDriveAuth.CssClass = ""
tblEmployees.empDriveAuth.ViewCustomAttributes = ""
' empTimeClock
If Convert.ToString(tblEmployees.empTimeClock.CurrentValue) = "1" Then
tblEmployees.empTimeClock.ViewValue = "Yes"
Else
tblEmployees.empTimeClock.ViewValue = "No"
End If
tblEmployees.empTimeClock.CssStyle = ""
tblEmployees.empTimeClock.CssClass = ""
tblEmployees.empTimeClock.ViewCustomAttributes = ""
' empUserPass
tblEmployees.empUserPass.ViewValue = "********"
tblEmployees.empUserPass.CssStyle = ""
tblEmployees.empUserPass.CssClass = ""
tblEmployees.empUserPass.ViewCustomAttributes = ""
' empUserLevel
If (Security.CurrentUserLevel And EW_ALLOW_ADMIN) = EW_ALLOW_ADMIN Then ' System admin
If Not IsDBNull(tblEmployees.empUserLevel.CurrentValue) Then
Select Case tblEmployees.empUserLevel.CurrentValue
Case "-1"
tblEmployees.empUserLevel.ViewValue = "Administrator"
Case "0"
tblEmployees.empUserLevel.ViewValue = "Default"
Case "1"
tblEmployees.empUserLevel.ViewValue = "Part Time"
Case "2"
tblEmployees.empUserLevel.ViewValue = "Standard Lighting"
Case "3"
tblEmployees.empUserLevel.ViewValue = "Admin Lighting"
Case "4"
tblEmployees.empUserLevel.ViewValue = "Full Time"
Case Else
tblEmployees.empUserLevel.ViewValue = tblEmployees.empUserLevel.CurrentValue
End Select
Else
tblEmployees.empUserLevel.ViewValue = System.DBNull.Value
End If
Else
tblEmployees.empUserLevel.ViewValue = "********"
End If
tblEmployees.empUserLevel.CssStyle = ""
tblEmployees.empUserLevel.CssClass = ""
tblEmployees.empUserLevel.ViewCustomAttributes = ""
' View refer script
' empID
tblEmployees.empID.HrefValue = ""
' empPayrollNumber
tblEmployees.empPayrollNumber.HrefValue = ""
' empUsername
tblEmployees.empUsername.HrefValue = ""
' empName
tblEmployees.empName.HrefValue = ""
' empFirstName
tblEmployees.empFirstName.HrefValue = ""
' empLastName
tblEmployees.empLastName.HrefValue = ""
' empAddress
tblEmployees.empAddress.HrefValue = ""
' empCity
tblEmployees.empCity.HrefValue = ""
' empState
tblEmployees.empState.HrefValue = ""
' empZIP
tblEmployees.empZIP.HrefValue = ""
' empPhone
tblEmployees.empPhone.HrefValue = ""
' empStatusID
tblEmployees.empStatusID.HrefValue = ""
' empStartDate
tblEmployees.empStartDate.HrefValue = ""
' empPositionID
tblEmployees.empPositionID.HrefValue = ""
' empRate
tblEmployees.empRate.HrefValue = ""
' empLastRaiseDate
tblEmployees.empLastRaiseDate.HrefValue = ""
' empLastRaiseAmount
tblEmployees.empLastRaiseAmount.HrefValue = ""
' empEmail
tblEmployees.empEmail.HrefValue = ""
' empLiftCert
tblEmployees.empLiftCert.HrefValue = ""
' empForkCert
tblEmployees.empForkCert.HrefValue = ""
' empDriveAuth
tblEmployees.empDriveAuth.HrefValue = ""
' empTimeClock
tblEmployees.empTimeClock.HrefValue = ""
' empUserPass
tblEmployees.empUserPass.HrefValue = ""
' empUserLevel
tblEmployees.empUserLevel.HrefValue = ""
End If
' Row Rendered event
tblEmployees.Row_Rendered()
End Sub
'
' Show link optionally based on user ID
'
Function ShowOptionLink() As Boolean
If Security.IsLoggedIn() AndAlso Not Security.IsAdmin() Then
Return Security.IsValidUserID(tblEmployees.empID.CurrentValue)
End If
Return True
End Function
' Page Load event
Public Sub Page_Load()
'HttpContext.Current.Response.Write("Page Load")
End Sub
' Page Unload event
Public Sub Page_Unload()
'HttpContext.Current.Response.Write("Page Unload")
End Sub
End Class
'
' ASP.NET Page_Load event
'
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Buffer = EW_RESPONSE_BUFFER
Response.Cache.SetCacheability(HttpCacheability.NoCache)
' Page init
tblEmployees_view = New ctblEmployees_view(Me)
tblEmployees_view.Page_Init()
' Page main processing
tblEmployees_view.Page_Main()
End Sub
'
' ASP.NET Page_Unload event
'
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
' Dispose page object
If tblEmployees_view IsNot Nothing Then tblEmployees_view.Dispose()
End Sub
End Class