public ChooseOilWell(YJXGPJ parent) { InitializeComponent(); DataContext = this; yjxgpl = parent; WaterWellsCollection = SelectWell(); DataSource = WaterWellsCollection.Copy(); }
public ChooseWell(Page parent) { InitializeComponent(); DataContext = this; parentPage = parent; WaterWellsCollection = SelectWell(); DataSource = WaterWellsCollection.Copy(); }
private void wellname_TextChanged(object sender, TextChangedEventArgs e) { string name = wellname.Text.Trim(); DataSource.Clear(); if (string.IsNullOrEmpty(name)) { WaterWellsCollection.Select().OfType <DataRow>().ToList().ForEach(x => DataSource.Rows.Add(x.ItemArray)); } else { WaterWellsCollection.Select("井号 like '%" + name + "%'").OfType <DataRow>().ToList().ForEach(x => DataSource.Rows.Add(x.ItemArray)); } }