PONO GrossRate
123 10
456 20
892 63
datatable contains:
PONo GrossRate
123 11
456 20
892 63
So question is to compare them & display the following result:(Changed GrossRate)
PONO GrossRate
123 111
help me...
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 21, 2012, 9:33 AM EDT
cHECKK THIS IS CORRECT ANSWER IF IT HELPED
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 21, 2012, 2:04 AM EDT
First take your database table records into C# DataTable(MyDataTable)
and then Compare two them as
DataTable Common=MyDataTable.clone()
foreach(DataRow Dr in Datatabl1.Rows)
{
foreach(DataRow Dr2 in MyDataTable.Rows)
{
if(Dr["Col1"]==Dr2["Col1"] && Dr["Col2"]==Dr2["Col2"])
{
DataRow DrTemp=Common.newRow();
DrTemp["Col1"]=Dr["Col1"];
DrTemp["Col2"]=Dr["Col2"];
Common.Rows.add(DrTemp);
}
}
}
Hope this helped, Check this is correct answer
Gopal Mahadak136 reputationPosted Aug 21, 2012, 3:35 AM EDT
Gopal Mahadak136 reputationPosted Aug 21, 2012, 8:12 PM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 22, 2012, 8:17 AM EDT