home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
66.142.0.142
/
66.142.0.142.tar
/
66.142.0.142
/
iPhone
/
punchclock.aspx.vb
< prev
next >
Wrap
Text File
|
2011-03-27
|
2KB
|
37 lines
Imports System.Data.OleDb
Imports System.Web
Imports System.Net.Mail
Partial Class iPhoneNet_Default
Inherits AspNetMaker7_tfpssnet
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim tmpDir As String, tmpID As Integer
tmpDir = Request.QueryString("Dir")
tmpID = Request.QueryString("ID")
If Not IsDBNull(tmpID) And Not IsDBNull(tmpDir) Then
Dim rs1 As OleDbDataReader
Dim sSql As String, tmpCount2 As Integer, tmpMessage As String = ""
sSql = "SELECT tblSchedule.schActualStart, tblSchedule.schActualEnd, tblSchedule.schEndTime, tblSchedule.schEndTime, tblSchedule.schOutTime, tblParts.prtDescription FROM tblParts " _
& "INNER JOIN tblSchedule ON tblParts.prtID = tblSchedule.schPartsID WHERE schSchID = " & tmpID
Conn = New cConnection()
rs1 = Conn.GetTempDataReader(sSql)
If rs1.Read() Then
Select Case tmpDir
Case "In"
sSql = "UPDATE tblSchedule SET schActualStart = #" & Now() & "# WHERE schSchID = " & tmpID
Case "Out"
sSql = "UPDATE tblSchedule SET schActualEnd = #" & Now() & "# WHERE schSchId = " & tmpID
If rs1("prtDescription") = "Unscheduled" Then
sSql = "UPDATE tblSchedule SET schActualEnd = #" & Now() & "#, schEndTime = #" & Now() & "#, schOutTime = #" & Now() & "# WHERE schSchId = " & tmpID
Else
sSql = "UPDATE tblSchedule SET schActualEnd = #" & Now() & "# WHERE schSchId = " & tmpID
End If
End Select
ew_Execute(sSql)
Response.Redirect("eventdetail.aspx?ID=" & tmpID)
End If
End If
End Sub
End Class