//20120803 Geovin Du
//塗聚文 締友計算機信息技術有限公司
DataTable dt = new DataTable();
dt=agreementMonthlySalaryListBLL.SelectImportExceltoDataGridView(fileUrl, sheet).Copy();
if ((dt != null) && (dt.Rows != null) && (dt.Rows.Count > 0))
{
List<System.Data.DataRow> removeRowIndex = new List<System.Data.DataRow>();
int RowCounter = 0;
foreach (System.Data.DataRow dRow in dt.Rows)
{
for (int index = 0; index < dt.Columns.Count; index++)
{
if (dRow[index] == DBNull.Value)
{
removeRowIndex.Add(dRow);
break;
}
else if (string.IsNullOrEmpty(dRow[index].ToString().Trim()))
{
removeRowIndex.Add(dRow);
break;
}
}
RowCounter++;
}
// Remove all blank of in-valid rows
foreach (System.Data.DataRow rowIndex in removeRowIndex)
{
dt.Rows.Remove(rowIndex);
}
}
dataGridView1.DataSource = null;
set.SetDataGridViewBindingSourceNavigatorBinds(dataGridView1,dt , bindingSource1, bindingNavigator1);
分享到:
相关推荐
商业编程-源码-Csharp实例76 使用DataTable.zip
Csharp.5.0.in.a.Nutshell.5th.Edition.pdf
Csharp.5.0.in.a.Nutshell 英文第五版
Visual Studio的AutoCADNetWizards2020项目模板,安装后提取出来的
MCAD MCSD CSharp Certification All in One Exam Guide MCAD MCSD CSharp Certification All in One Exam Guide MCAD MCSD CSharp Certification All in One Exam Guide
C#深入学习 CSharp_in_Depth_2nd_Edition
Sams.Sams.Teach.Yourself.Visual.CSharp.2010.in.24.Hours.Jun.2010.rar
Introduction to Design Patterns in CSharp Introduction to Design Patterns in CSharp Introduction to Design Patterns in CSharp Introduction to Design Patterns in CSharp
1、C#5.0开发资料,写得很好,进阶必看! 2、外国人写的书,全英文档! 3、资源分2分,意思一下!
O\'Reilly - CSharp in a Nutshell
CSharp标准.CSharp标准.CSharp标准.CSharp标准.CSharp标准.
CSharp 4.0 New features
CSharp in Depth 3rd Edition
C#编程思想 全集,欢迎下载,C#编程思想 全集,欢迎下载,
CSharp in Depth - What you need to master CSharp 2 and 3.pdf
lzw源码,比较好压缩解压算法源码网页的字体、大小、颜色及页面布局的语言,使用任何的文本编辑器都可以 对它进行编辑,与VB、C++等编程...最多可包含 256 种颜色(包括透明色)。文 件的大小取决于实际使用的颜色数目。...
Learning CSharp Learning CSharp Learning CSharp Learning CSharp
clustering algorithm in .NET ofr data mining
thinking in csharp 英文版 vs thinging in java