method
public DataSet FindRecord(int RollNumber)
is return data set, so you can get the result after you call that method in your BusinessLogicLayer
public void findRec(int RollNumber)
{
Dal objdal = new Dal();
DataSet ds = objdal.FindRecord(RollNumber);
}
you can return this data set by changing signature of the method as below
public DataSet findRec(int RollNumber)
{
Dal objdal = new Dal();
DataSet ds = objdal.FindRecord(RollNumber);
return ds;
}
then
protected void btnfind_Click(object sender, EventArgs e)
{
int rollnumber = int.Parse(txtrollnumber.Text);
Bo objbo = new Bo();
DataSet ds =objbo.findRec(rollnumber);
if(ds !=null && ds.Tables.Count >0 && ds.Tables[0].Rows.Count >0)
{
txtName.Text = ds.Tables[0].Rows[0]["Name"].ToString();
txtAddress.Text = ds.Tables[0].Rows[0]["Address"].ToString();
txtPhone.Text = ds.Tables[0].Rows[0]["Phone"].ToString();
}
}