3 Tier Login Example
Login Page
public partial class login : System.Web.UI.Page
{
businessLogic obj = new businessLogic();
protected void button_Click(object sender, EventArgs e)
{
obj.Username = username.Text;
obj.Password = password.Text;
obj.loginbll();
Response.Redirect("HOme.aspx");
}
}
BLL:
using databaselogic;
public class businessLogic
{
public businessLogic ()
{
databaselogic obj_Bl = new databaselogic();
}
public string _username, _password;
public string Username
{
get { return _username; }
set { _username = value; }
}
public string Password
{
get { return _password; }
set { _password = value; }
}
public void loginbll()
{
obj_Bl.login(Username,Password);
}
DAL:
namespace databaselogic
{
public class databaselogic
{
public databaselogic()
{
}
public void login(string username, string password)
{
//code related to Queries goes on here
}
}
}
Category: