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 >
Text File  |  2011-03-27  |  2KB  |  37 lines

  1. ∩╗┐Imports System.Data.OleDb
  2. Imports System.Web
  3. Imports System.Net.Mail
  4.  
  5. Partial Class iPhoneNet_Default
  6.     Inherits AspNetMaker7_tfpssnet
  7.  
  8.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  9.         Dim tmpDir As String, tmpID As Integer
  10.         tmpDir = Request.QueryString("Dir")
  11.         tmpID = Request.QueryString("ID")
  12.         If Not IsDBNull(tmpID) And Not IsDBNull(tmpDir) Then
  13.             Dim rs1 As OleDbDataReader
  14.             Dim sSql As String, tmpCount2 As Integer, tmpMessage As String = ""
  15.             sSql = "SELECT tblSchedule.schActualStart, tblSchedule.schActualEnd, tblSchedule.schEndTime, tblSchedule.schEndTime, tblSchedule.schOutTime, tblParts.prtDescription FROM tblParts " _
  16. & "INNER JOIN tblSchedule ON tblParts.prtID = tblSchedule.schPartsID WHERE schSchID = " & tmpID
  17.             Conn = New cConnection()
  18.             rs1 = Conn.GetTempDataReader(sSql)
  19.             If rs1.Read() Then
  20.                 Select Case tmpDir
  21.                     Case "In"
  22.                         sSql = "UPDATE tblSchedule SET schActualStart = #" & Now() & "# WHERE schSchID = " & tmpID
  23.                     Case "Out"
  24.                         sSql = "UPDATE tblSchedule SET schActualEnd = #" & Now() & "# WHERE schSchId = " & tmpID
  25.                         If rs1("prtDescription") = "Unscheduled" Then
  26.                             sSql = "UPDATE tblSchedule SET schActualEnd = #" & Now() & "#, schEndTime = #" & Now() & "#, schOutTime = #" & Now() & "# WHERE schSchId = " & tmpID
  27.                         Else
  28.                             sSql = "UPDATE tblSchedule SET schActualEnd = #" & Now() & "# WHERE schSchId = " & tmpID
  29.                         End If
  30.                 End Select
  31.                 ew_Execute(sSql)
  32.                 Response.Redirect("eventdetail.aspx?ID=" & tmpID)
  33.             End If
  34.         End If
  35.     End Sub
  36. End Class
  37.