namespace DataAccessLayer
{
public class clsDL
{
string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
public object ExecuteSqlString(string sqlstring)
{
SqlConnection objsqlconn = new SqlConnection(conn);
objsqlconn.Open();
DataSet ds = new DataSet();
SqlCommand objcmd = new SqlCommand(sqlstring, objsqlconn);
SqlDataAdapter objAdp = new SqlDataAdapter(objcmd);
objAdp.Fill(ds);
return ds;
}
public object LoadCustomerDB()
{DataSet ds = new DataSet();
string sql = "SELECT * from tbl_Customer order by CustID";
ds = (DataSet)ExecuteSqlString(sql);
return ds;
}
}
}
this is my data layer..
protected void Page_Load(object sender, EventArgs e)
{
objLogic = new clsBL();
GridView1.DataSource = objLogic.LoadCustomer();
GridView1.DataBind();
}
this is mu default aspx page
namespace BussinessLayer
{
public class clsBL
{
public clsDL objDataLayer = new clsDL();
public object LoadCustomer()
{
return objDataLayer.LoadCustomerDB();
}
}
this is my business layer
how should i get my single data