private void CheckDataRepeat(DataSet dataSet, out string message)
{
message = string.Empty;
DataView dv = new DataView(dataSet.Tables[0]);
DataTable dtBmzd = null;
dtBmzd = dv.ToTable(true, new string[] { "列名1", "列名2" });
if (dtBmzd.Rows.Count < dataSet.Tables[0].Rows.Count)
{
message += "【列名1】、【列名2】值必须唯一,Excel中存在重复的数据,请确认!\n";
}
}
顶替夺标地顶替顶替
啊哈哈,正好需要