protected static DataSet DFRecords(string yrmo) { DataSet dsMatched1 = ReconDAL.getReconM(yrmo); DataSet dfDups = getDFDups(yrmo); DataSet dsUnMatched1 = ReconDAL.getClaimsUM(yrmo); DataRow rowNew; DataSet dsDFTotal = new DataSet(); DataTable tempTable1, newTable1; tempTable1 = dsMatched1.Tables[0]; newTable1 = dsDFTotal.Tables.Add("newTable1"); DataColumn col; col = new DataColumn("Type"); newTable1.Columns.Add(col); col = new DataColumn("RecordCount"); newTable1.Columns.Add(col); col = new DataColumn("DupCount"); newTable1.Columns.Add(col); col = new DataColumn("TotalCount"); newTable1.Columns.Add(col); int _grandTotal = 0; rowNew = newTable1.NewRow(); rowNew["Type"] = "Anthem DF Records Summary"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = ""; newTable1.Rows.Add(rowNew); rowNew = newTable1.NewRow(); rowNew["Type"] = "Matched without Dups"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; _grandTotal = dsMatched1.Tables[0].Rows.Count - getDupsCountDFinMatched(yrmo, " > 1"); rowNew["TotalCount"] = _grandTotal; newTable1.Rows.Add(rowNew); List <int> _dupCnt = new List <int>(); _dupCnt = getRecordCountDFRFDup(yrmo); foreach (int x in _dupCnt) { int _temp = getDupsCountDFinMatched(yrmo, " = " + x); if (_temp != 0) { rowNew = newTable1.NewRow(); rowNew["Type"] = "Dups on Matched Report"; rowNew["RecordCount"] = x; rowNew["DupCount"] = _temp; rowNew["TotalCount"] = (x * _temp); _grandTotal = _grandTotal + (x * _temp); newTable1.Rows.Add(rowNew); } } rowNew = newTable1.NewRow(); rowNew["Type"] = "UnMatched"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = dsUnMatched1.Tables[0].Rows.Count; _grandTotal = _grandTotal + dsUnMatched1.Tables[0].Rows.Count; newTable1.Rows.Add(rowNew); rowNew = newTable1.NewRow(); rowNew["Type"] = "Grand Total:"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = _grandTotal; newTable1.Rows.Add(rowNew); rowNew = newTable1.NewRow(); rowNew["Type"] = ""; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = ""; newTable1.Rows.Add(rowNew); return(dsDFTotal); }