i want to compare the value of weeklyoff given in the query
like:
if(weeklyOff == 1)
{
weekvalue = "yes";
}
else
{
weekvalue = " ";
}
i want to have this type of code. how can i compare the value from database. please help me out.
protected void btn_Details_Click1(object sender, EventArgs e)
{
DataTable dt = new DataTable();
try
{
DBHelper obCon = new DBHelper(ConfigurationManager.AppSettings["localCommon"].ToString());
string weekof = "select weeklyOff from common.dbo.User_dailyshift where userid = '97690'";
string weekvalue = " ";
DataSet ds = new DataSet();
ds = obCon.ExecuteAdapter(weekof);
grid_Report.DataSource = ds;
grid_Report.DataBind();
}
catch (Exception ex)
{
Response.Write(ex);
}