using System;
using System.Data;
using System.Data.SqlClient;
using AcPro.DataLayer;
namespace AcPro.BusinessLayer
{
///
/// Summary description for loging.
///
public class login
{
public login()
{
}
private string P_orgname;
public string orgname
{
set
{
P_orgname=value;
}
get
{
return P_orgname;
}
}
private string P_username;
public string username
{
set
{
P_username=value;
}
get
{
return P_username;
}
}
private string P_pwd;
public string pwd
{
set
{
P_pwd=value;
}
get
{
return P_pwd;
}
}
public DataSet Executesp()
{
string strsql="loginsuccess";
SqlParameter[] prms;
prms=new SqlParameter[3];
prms[0]=new SqlParameter("@orgname",orgname);
prms[1]=new SqlParameter("@username",username);
prms[2]=new SqlParameter("@pwd",pwd);
DataSet ds=DataAccess.ExecuteSql(strsql,prms);
return ds;
}
}
}
Presentation Layer -C#
Login is Business Layer File Name
login ln=new login();
ln.orgname=Ddl_OrgName.SelectedItem.Text.Trim();
Session["OrgName"]=Ddl_OrgName.SelectedItem.Text.Trim(); // For Display purpose -Muhil
ln.username=txt_UserName.Text.Trim();
Session["UserName"]=txt_UserName.Text.Trim(); //For Display purpose -Muhil
ln.pwd=txt_Password.Text.Trim();
DataSet ds=ln.Executesp();
No comments:
Post a Comment