Ejemplo n.º 1
0
    protected void BtnConfirm_Click(object sender, EventArgs e)
    {
        ClassLibrary.clsCustomerCollection custcollect = new ClassLibrary.clsCustomerCollection();
        lblError.Text = "HELP";
        //store data in varaibales
        string UserName = TxtLogin.Text;
        string Password = txtPassword.Text;

        try
        {
            bool logintrue = custcollect.login(UserName, Password);
            if (logintrue == true)
            {
                Response.Redirect("CustomerHome.aspx");
            }
            else
            {
                lblError.Text = "Login Failed";
            }
        }
        catch
        {
            lblError.Text = "Your login was unsuccessful. Try again.";
        }
    }
Ejemplo n.º 2
0
    bool login(string UserName, string Password)
    {
        ClassLibrary.clsCustomerCollection custcollection = new ClassLibrary.clsCustomerCollection();
        bool logintrue = custcollection.login(UserName, Password);

        if (logintrue == true)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }