我希望能够查询一个包含正确记录的子集,然后查询前后 6 个,总共 13 行,并将它们显示在 DGV 中。拉取正确行的查询如下:
private void textBox6_Leave(object sender, EventArgs e)
{
DataClasses3DataContext db = new DataClasses3DataContext();
var matchedAdd = (from c in db.GetTable<prop>()
where c.HOUSE_NO.Contains(textBox1.Text) && c.Direction.Contains(textBox2.Text) && c.street.Contains(textBox3.Text) && c.SUFF.Contains(textBox4.Text)
select c).SingleOrDefault();
}