var query = from p in db.tblWater
where (_phFrom.Value >= p.CH1 || _phFrom == null)
&& (_phTo.Value <= p.CH1 || _phTo == null)
&& (_tssFrom.Value >= p.CH2 || _tssFrom == null)
&& (_tssTo.Value <= p.CH2 || _tssTo == null)
&& (_codFrom.Value >= p.CH3 || _codFrom == null)
&& (_codTo.Value <= p.CH3 || _codTo == null)
&& (_tempFrom.Value >= p.CH4 || _tempFrom == null)
&& (_tempTo.Value <= p.CH4 || _tempTo == null)
&& (p.RegDate.CompareTo(txtDate1.Text) >= 0 || txtDate1.Text == "")
&& (p.RegDate.CompareTo(txtDate2.Text) <= 0 || txtDate2.Text == "")
&& (p.RegTime.CompareTo(txtTime1.Text) >= 0 || txtTime1.Text == "")
&& (p.RegTime.CompareTo(txtTime2.Text) <= 0 || txtTime2.Text == "")
select p;
And also have a dictionary object like this:
var dicItems = new Dictionary();
Which each keys of dictionary items are exist in my select.
Question is how i can select that columns are exist in my dictionary(not other)?
In other word i want to make user to select the columns that they wants.
Any body please help me?