Exemple #1
0
    protected void Login_Authenticate(object sender, AuthenticateEventArgs e)
    {
        string username    = Login.UserName;
        string pwd         = Login.Password;
        string sqlUserName = "******" + username + "' and password = '******' and " +
                             "Status = 1";

        System.Data.DataTable dt = Connection.readTab(sqlUserName, DBAccess.connMSTicket);
        if (dt != null && dt.Rows.Count > 0)
        {
            string ip = GetIP();
            GTICKBOL.Update_AgentLogin(username, pwd, ip);
            Session["Agent"] = username;
            Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Agent login:  "******"AgentProfile.aspx", false);
        }
        else
        {
            Session["UserAuthentication"] = "";
            Message.Text = "Sorry! Your login or password is incorrect. <br>Please log in again.";
        }
    }