/// <summary>
 /// 查询本地数据 本地有数据返回true,没有则返回false
 /// </summary>
 private Boolean Search(String whereSql, String orderBySql, int type)
 {
     try
     {
         type = (whereSql.Length == 0 && orderBySql.Length == 0) ? 1 : 2;
         DataTable dataTable = WisdomCls.GetAsDataTable(whereSql, orderBySql, type);
         if (dataTable != null && dataTable.Rows.Count > 0)
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(false);
 }
 /// <summary>
 /// 查询本地数据 本地有数据返回true,没有则返回false
 /// </summary>
 private Boolean Search(string whereSql, string orderBySql, int type)
 {
     this.DataGridRecord.ItemsSource = null;
     try
     {
         type       = (whereSql.Length == 0 && orderBySql.Length == 0) ? 1 : 2;
         _dataTable = WisdomCls.GetAsDataTable(whereSql, orderBySql, type);
         if (_dataTable != null && _dataTable.Rows.Count > 0)
         {
             this.DataGridRecord.ItemsSource = _dataTable.DefaultView;
             return(true);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(false);
     }
     return(false);
 }