コード例 #1
0
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (tbxSearch.Text == null || tbxSearch.Text == "")
         return;
     DataSet_CaseTableAdapters.T_CaseTableAdapter adapter = new DataSet_CaseTableAdapters.T_CaseTableAdapter();
     dtSource = adapter.GetDataByKey(tbxSearch.Text);
     string strType = "";
     string strTime = "";
     string strArea = "";
     if (cbbType.SelectedIndex >0)
         strType = ((ComboBoxItem)cbbType.SelectedItem).Content.ToString();
     if (cbbTime.SelectedIndex > 0)
         strTime = ((ComboBoxItem)cbbTime.SelectedItem).Content.ToString();
     if (cbbArea.SelectedIndex > 0)
         strArea = ((ComboBoxItem)cbbArea.SelectedItem).Content.ToString();
     foreach (DataSet_Case.T_CaseRow row in dtSource)
     {
         if (row.CreateTime != strTime && strTime != "")
             dtSource.RemoveT_CaseRow(row);
         else if (row.Menu1 != strType && strType != "")
             dtSource.RemoveT_CaseRow(row);
         else if (row.CaseCountry != strArea && strArea != "")
             dtSource.RemoveT_CaseRow(row);
     }
     DataBind(20, 1);
 }
コード例 #2
0
 public PageCase()
 {
     InitializeComponent();
     ShowTreeView();
     DataSet_CaseTableAdapters.T_CaseTableAdapter adapter = new DataSet_CaseTableAdapters.T_CaseTableAdapter();
     dtSource = adapter.GetDataByMenu("学校发展案例");
     DataBind(20, 1);
 }
コード例 #3
0
 private void TextBlock_MouseDown_1(object sender, MouseButtonEventArgs e)
 {
     TextBlock tbl = (TextBlock)sender;
     string str = tbl.Text;
     DataSet_CaseTableAdapters.T_CaseTableAdapter adapter = new DataSet_CaseTableAdapters.T_CaseTableAdapter();
     dtSource = adapter.GetDataByMenu(str);
     DataBind(20, 1);
 }