Project_Detail pro = new Project_Detail();
string title=Ttitle.Text;
string year1=Tyear.Text;
string key = Tkeywrds.Text;
string area = Ddl_area.Text;
string categ = Ddl_catgry.Text;
string tech = Ddl_tech.Text;
string type =Ddl_type.Text;
var q = from obj in da.Project_Details
where obj.Project_Title.Contains(title)
|| obj.Submission_Date.Contains(year1)
|| obj.Keywords.Contains(key)
|| obj.Project_Area.Contains(area)
|| obj.Project_Category.Contains(categ)
|| obj.Project_Technology.Contains(tech)
|| obj.Project_Type.Contains(type)
select obj;
if (q != null)
{
DetailsView1.DataSource = q;
DetailsView1.DataBind();
}
else
{
Literal1.Text = "Data not found";
}
这段代码给出了表的最后一条记录,也没有给出其他条件结果。我想要所有条件的结果,并且想要使用 Like satatement。