private void searchTextBox1_OnSearch(object sender, SearchEventArgs e) { TDataInfoDTO[] result = null; if (string.IsNullOrEmpty(e.SearchText)) { result = _client.TDataInGetByForginKey(_baseInfoId); } else { result = _client.TDataInQuery(false, DateTime.Now, DateTime.Now, e.SearchText, _baseInfoId); } LvDataContent.Items.Clear(); Array.ForEach(result, t => { CreateViewItem(t, LvDataContent.Items.Count); }); }