home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / iPhone / login.aspx.vb < prev    next >
Text File  |  2012-03-03  |  2KB  |  52 lines

  1. ∩╗┐Imports System.Data.OleDb
  2.  
  3. Partial Class iPhoneNet_Default
  4.     Inherits AspNetMaker7_tfpssnet
  5.  
  6.     Public tmpUserName As String
  7.     Public tmpPassword As String
  8.  
  9.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  10.         If Not IsPostBack Then
  11.             If Request.Cookies("TFProduction") Is Nothing Then
  12.                 tmpUserName = ""
  13.             Else
  14.                 tmpUserName = Request.Cookies("TFProduction")("username")
  15.                 username.Text = tmpUserName
  16.             End If
  17.         End If
  18.     End Sub
  19.  
  20.     Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
  21.  
  22.         Dim tmpEmpName As String, tmpEmpID As Integer, tmpEmail As String
  23.  
  24.         tmpUserName = Request.Form("username")
  25.         tmpPassword = Request.Form("password")
  26.         tmpEmpName = ""
  27.  
  28.         Dim tlcsub As New AspNetMaker7_tfpssnet
  29.         Call tlcsub.tlcGetEmployeeLogin(tmpUserName, tmpPassword, tmpEmpName, tmpEmpID)
  30.  
  31.         If Not IsDBNull(tmpEmpID) Then
  32.             Session("TFProduction_Status_UserName") = tmpUserName
  33.             Session("TFProduction_Status_UserID") = tmpEmpName
  34.             Session("TFProduction_Status_EmpID") = tmpEmpID
  35.             tmpEmail = tlcsub.tlcGetEmployeeEmail(tmpEmpID)
  36.             Session("tfpssnet_Status_Email") = tmpEmail
  37.             Response.Cookies("TFProduction")("username") = tmpUserName
  38.             If tlcsub.tlcGetUnRecCount(tmpUserName) > 0 Then
  39.                 Response.Redirect("schedule2.aspx")
  40.             Else
  41.                 Response.Redirect("default.aspx")
  42.             End If
  43.         Else
  44.             Session("TFProduction_Status_UserName") = ""
  45.             Session("TFProduction_Status_UserID") = ""
  46.             Session("TFProduction_Status_EmpID") = ""
  47.             Response.Redirect("nologin.aspx")
  48.         End If
  49.     End Sub
  50.  
  51. End Class
  52.