public bool IsDatatableSame(DataTable tbl1, DataTable tbl2)
{
int tbl1_Count = 0;
int tbl2_Count = 0;
for (int i = 0; i <= tbl1.Rows.Count - 1; i++)
{
if (!string.IsNullOrEmpty(tbl1.Rows[i][4].ToString()))
{
tbl1_Count = tbl1_Count + 1;
}
}
for (int i = 0; i <= tbl2.Rows.Count - 1; i++)
{
if (!string.IsNullOrEmpty(tbl2.Rows[i][4].ToString()))
{
tbl2_Count = tbl2_Count + 1;
}
}
if (tbl1_Count != tbl2_Count || tbl1.Columns.Count != tbl2.Columns.Count)
return false;
return true;
}