public DataSet GetTender1(int ID)
{
DataSet dt = new DataSet();
SqlConnection con = new SqlConnection(varConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "usp_GetTenderByID";
cmd.Parameters.Add(new SqlParameter("@Id", ID));
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
try
{
adapter.Fill(dt);
}
catch
{
dt = null;
}
return dt;
}
now call the following method
public DataSet GetTender1(int ID)
{
TenderTypeDAL tenderDAL = new TenderTypeDAL();
DataSet ds= new DataSet();
ds= tenderDAL.GetTender1(ID);
return ds;
}
please, mark this as answer if it resolves the error...