private void _query_Click(object sender, RoutedEventArgs e) { string company_name = _company_name.Text; System.Data.DataTable table = operationContract.ExecuteProQueryCompany(PubClass.userInfo.ID, _province1.SelectedIndex < 1 ? "" : (_province1.SelectedItem as Label).Tag.ToString(), _city1.SelectedIndex < 1 ? "" : (_city1.SelectedItem as Label).Tag.ToString(), _region1.SelectedIndex < 1 ? "" : (_region1.SelectedItem as Label).Tag.ToString(), _detect_dept.SelectedIndex < 1 ? "" : (_detect_dept.SelectedItem as Label).Tag.ToString(), company_name); lvlist.DataContext = table; exporttable = table; _sj.Visibility = Visibility.Visible; _hj.Visibility = Visibility.Visible; _title.Text = table.Rows.Count.ToString(); if (table.Rows.Count == 0) { Toolkit.MessageBox.Show("没有查询到数据!", "系统提示", MessageBoxButton.OK, MessageBoxImage.Information); return; } }