I have some data in my database like Skillname for example C#,C++ and so an, and the user can also save his skillevel that are stars that he saves from 1 star to four stars, not I am trying to, when I search for the skillname it display the Users names but I have also created a radiobuttonlist that display from 1 star to 4 stars so when the user select from the radiobuttonlist list and then select I want it to display the names that has that skill and that level.
In my search button I have like this
if (RadioDisplayLevel.SelectedIndex == 0 || RadioDisplayLevel.SelectedIndex == 1 || RadioDisplayLevel.SelectedIndex == 2 || RadioDisplayLevel.SelectedIndex == 3)
{
FilterStarsLevel();
}
And my function looks like this,
private void FilterStarsLevel()
{
{
using (var db = new knowitCVdbEntities())
{
var searchTechSkill = from p in db.EMPLOYEES
join ets in db.EMPLOYEES_TECHNICAL_SKILLS on p.employee_id equals
ets.employee_id join ts in db.TECHNICAL_SKILLS_VALUES on technical_skill_value_id equals ts.technical_skill_value_id join tsl in db.TECHNICAL_SKILL_LEVEL on ets.technical_skill_level_id equals tsl.technical_skill_level_id where tsl.skill_level.Contains(RadioDisplayLevel.SelectedItem.Text)
select new Techskillsearch()
{
EmployeeId = p.employee_id,
Firstname = p.firstname,
LastName = p.lastname,
TechnicalSkillValueId = ts.technical_skill_value_id,
SkillName = ts.skill_name,
SkillNameOther = ets.skill_name_other,
SkillType = ts.skill_type,
TechnicalSkillLevelId = tsl.technical_skill_level_id,
SkillLevel = tsl.skill_level
};
foreach (var vEmp in searchTechSkill)
{
if (vEmp != null)
{
if (
!_searchEmpList.Contains(vEmp.Firstname + " " + vEmp.LastName + "," +
vEmp.EmployeeId))
{
_searchEmpList.Add(vEmp.Firstname + " " + vEmp.LastName + "," + vEmp.EmployeeId.ToString());
}
}
}
}
}
}
But I don't get it to work because it doesn't filter as I want to.
Any Sugestions ?