Ejemplo n.º 1
0
 private void btn_Search_Click(object sender, EventArgs e)
 {
     try
     {
         int start, end;
         if (!int.TryParse(tb_StartId.Text, out start))
         {
             start = 0;
         }
         if (!int.TryParse(tb_EndId.Text, out end))
         {
             end = 100000000;
         }
         filter = string.Format("{0} >= {1} AND {0} <= {2} AND ({0} LIKE '%{4}%' OR {3} LIKE '%{4}%')",
                                args.column_id, start, end, args.column_name, tb_Keyword.Text);
         cur_dataView.RowFilter = filter;
         args.start_id          = tb_StartId.Text;
         args.end_id            = tb_EndId.Text;
         XMLController.WriteTableSearchXML();
         InitTable();
     }
     catch (Exception ex)
     {
         ConfigUtils.Error(ex.Message, ex.StackTrace);
         if (ex.InnerException != null)
         {
             ConfigUtils.Error(ex.InnerException.Message, ex.InnerException.StackTrace);
         }
     }
 }