123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
- namespace Bowin.Common.Utility
- {
- public static class DataTableCollectionExtension
- {
- /// <summary>
- /// 移除所有空行。
- /// </summary>
- /// <param name="ds"></param>
- /// <returns></returns>
- public static void RemoveAllEmpty(this DataTableCollection dataTableCollection)
- {
- if (dataTableCollection == null)
- {
- throw new ArgumentNullException("dataTableCollection");
- }
- foreach (DataTable dt in dataTableCollection)
- {
- dt.Rows.RemoveAllEmpty();
- }
- }
- }
- }
|