/// <summary> /// 从DataTable中查询数据 /// </summary> /// <param name="tb">待处理的DataTable</param> /// <param name="expression">找匹配(条件)(不用where ,直接就"什么=什么")</param> /// <returns>符合你条件的DataTable</returns> public DataTable GetDataTableByFilter(DataTable tb, string expression) { DataRow[] foundRows; try { foundRows = tb.Select(expression); } catch (Exception err) { throw err; } return CopyData(foundRows, tb); }