Beispiel #1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        //create an instance of the authentication class
        clsLogin Login = new clsLogin();
        //declare a variable to store the customer no if the user who logged in
        Int32 CustomerNo;

        //authenticate the login
        CustomerNo = Login.SignIn(txtUserName.Text, txtPassword.Text);
        //if there is a customer number returned
        if (CustomerNo != 0)
        {
            //set the CustomerNumber
            Booking.CustomerNo = CustomerNo;
            //go onto the next step
            Response.Redirect("Checkout.aspx");
        }
        else
        {
            //otherwise the login failed so report an error
            lblError.Text = "Login failed";
        }
    }