日期:2014-05-17 浏览次数:20861 次
for (int i = dt.Rows.Count - 1; i > -1; i--)
{
bool bo = false;
DataRow row;
try
{
row = dt.Rows[i];
}
catch (Exception)
{
continue;
}
for (int j = i - 1; j > -1; j--)
{
DataRow row2 = dt.Rows[j];
if (row[0].ToString() == row2[0].ToString())//若该字段相同,则存在重复,将重复行号,手机号码加入dupList
{
bo = true;
failureCount++;
errdt.Select("Index='" + row2["Index"].ToString() + "'")[0]["错误信息"] = "重复(手机号码为" + row2["手机号码"].ToString() + "的所有短信不会发送!)";