private void BindsearchOso()
{
if (keyList != null)
{
if (keyList.Contains("12") && roles["12"] > 2)
{
var result = db.MstrOSoOfficesMarkets.Where(x => x.IsDeleted == 0).ToList();
ddlSearchOso.DataSource = result;
}
else
{
var result = db.MstrOSoOfficesMarkets.Where(x => x.IsDeleted == 0).ToList().Where(x => keyList.Contains(x.OSOOfficesMarketsPkID.ToString())).ToList();
ddlSearchOso.DataSource = result;
}
ddlSearchOso.DataValueField = "OSOOfficesMarketsPkID";
ddlSearchOso.DataTextField = "Name";
ddlSearchOso.DataBind();
ListItem l = new ListItem("Office", "0");
ddlSearchOso.Items.Insert(0, l);
}
}
{
if (keyList != null)
{
if (keyList.Contains("12") && roles["12"] > 2)
{
var result = db.MstrOSoOfficesMarkets.Where(x => x.IsDeleted == 0).ToList();
ddlSearchOso.DataSource = result;
}
else
{
var result = db.MstrOSoOfficesMarkets.Where(x => x.IsDeleted == 0).ToList().Where(x => keyList.Contains(x.OSOOfficesMarketsPkID.ToString())).ToList();
ddlSearchOso.DataSource = result;
}
ddlSearchOso.DataValueField = "OSOOfficesMarketsPkID";
ddlSearchOso.DataTextField = "Name";
ddlSearchOso.DataBind();
ListItem l = new ListItem("Office", "0");
ddlSearchOso.Items.Insert(0, l);
}
}