protected void bindgrdvUnmatchedDFRF() { string yrmo = ddlYrmo.SelectedItem.Text; DataSet ds = new DataSet(); ds = ReconDAL.getRFDFUM(yrmo); if (ds.Tables[0].Rows.Count > 0) { grdvUnmatchedDFRF.DataSource = ds; grdvUnmatchedDFRF.DataBind(); } }
protected void lnkAdjMatched_OnClick(object sender, EventArgs e) { lblErrRep.Text = ""; ClaimsRecon repObj3 = new ClaimsRecon(); DataSet ds = new DataSet(); DataSet dsFinal = new DataSet(); dsFinal.Clear(); string yrmo = repObj3.latestReconYrmo(); string filename = "DFRF_matched_mismatched_Details_" + yrmo; string[][] cols = { new string[] { "YRMO", "DCN", "Anthem Claims Amount", "DFRF Amount", "Variance" }, new string[] { "YRMO", "DCN", "Anthem Claims Amount", "DFRF Amount", "Variance" }, new string[] { "YRMO", "DCN", "Subscriber ID", "Paid Date", "DFRF Amount" }, new string[] { "YRMO", "DCN", "Subscriber ID", "Paid Date", "Anthem Claims Amount" }, new string[] { "Type", "Record Count", "Dups Count", "Total Count" } }; string[][] colsFormat = { new string[] { "string", "string", "decimal", "decimal", "decimal" }, new string[] { "string", "string", "decimal", "decimal", "decimal" }, new string[] { "string", "string", "string", "string", "decimal" }, new string[] { "string", "string", "string", "string", "decimal" }, new string[] { "string", "string", "string", "string" } }; string[] sheetnames = { "Matched_Records", "Mismatched_Records", "DFRF_with_no_matching_Anthem", "Anthem_with_no_matching_DFRF", "Records_Summary" }; string[] titles = { "DFRF Reconciliation Matched Records by DCN and Amount for " + yrmo, "DFRF Reconciliation Mismatched Records by Amount for " + yrmo, "DCN Records in DF/RF not in Anthem Claims for " + yrmo, "DCN records in Anthem Claims not in DF/RF for " + yrmo, "Summary of records from Anthem DF Report & DFRF Report for " + yrmo }; try { ds = ReconDAL.getMatchedDCNAmnt(yrmo, "Matched"); ds.Tables[0].TableName = "matchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[0].TableName = "matchedTableF"; ds.Clear(); ds = ReconDAL.getMatchedDCNAmnt(yrmo, "UnMatched"); ds.Tables[0].TableName = "mismatchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[1].TableName = "mismatchedTableF"; ds.Clear(); ds = ReconDAL.getRFDFUM(yrmo); ds.Tables[0].TableName = "unmatch_DFRFTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[2].TableName = "unmatch_DFRFTableF"; ds.Clear(); ds = ReconDAL.getClaimsUM(yrmo); ds.Tables[0].TableName = "unmatch_AnthTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[3].TableName = "unmatch_AnthTableF"; ds.Clear(); ds = RecordCount.SummaryRecordsFinal(yrmo); ds.Tables[0].TableName = "summRecords"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[4].TableName = "summRecordsF"; ds.Clear(); ExcelReport.ExcelXMLRpt(dsFinal, filename, sheetnames, titles, cols, colsFormat); } catch (Exception ex) { lblErrRep.Text = "Error in generating excel report" + ex.Message; } }
protected static DataSet DFRFRecords(string yrmo) { DataSet dsMatched = ReconDAL.getReconM(yrmo); DataSet dfrfDups = getDFRFDups(yrmo); DataSet dsUnMatched = ReconDAL.getRFDFUM(yrmo); DataRow rowNew; DataSet dsDFRFTotal = new DataSet(); DataTable tempTable, newTable; tempTable = dsMatched.Tables[0]; newTable = dsDFRFTotal.Tables.Add("newTable1"); DataColumn col; col = new DataColumn("Type"); newTable.Columns.Add(col); col = new DataColumn("RecordCount"); newTable.Columns.Add(col); col = new DataColumn("DupCount"); newTable.Columns.Add(col); col = new DataColumn("TotalCount"); newTable.Columns.Add(col); int _grandTotal = 0; rowNew = newTable.NewRow(); rowNew["Type"] = "DFRF Records Summary"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = ""; newTable.Rows.Add(rowNew); rowNew = newTable.NewRow(); rowNew["Type"] = "Matched without Dups"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; _grandTotal = dsMatched.Tables[0].Rows.Count - getDupsCountDFRFinMatched(yrmo, " > 1"); rowNew["TotalCount"] = _grandTotal; newTable.Rows.Add(rowNew); List <int> _dupCnt = new List <int>(); _dupCnt = getRecordCountDFRFDup(yrmo); foreach (int x in _dupCnt) { int _temp = getDupsCountDFRFinMatched(yrmo, " = " + x); if (_temp != 0) { rowNew = newTable.NewRow(); rowNew["Type"] = "Dups on Matched Report"; rowNew["RecordCount"] = x; rowNew["DupCount"] = _temp; rowNew["TotalCount"] = (x * _temp); _grandTotal = _grandTotal + (x * _temp); newTable.Rows.Add(rowNew); } } rowNew = newTable.NewRow(); rowNew["Type"] = "UnMatched"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = dsUnMatched.Tables[0].Rows.Count; _grandTotal = _grandTotal + dsUnMatched.Tables[0].Rows.Count; newTable.Rows.Add(rowNew); rowNew = newTable.NewRow(); rowNew["Type"] = "Grand Total:"; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = _grandTotal; newTable.Rows.Add(rowNew); rowNew = newTable.NewRow(); rowNew["Type"] = ""; rowNew["RecordCount"] = ""; rowNew["DupCount"] = ""; rowNew["TotalCount"] = ""; newTable.Rows.Add(rowNew); return(dsDFRFTotal); }
private void SortGridView(string sortExpression, string direction, string source) { ClaimsRecon repObj = new ClaimsRecon(); DataTable dt; DataView dv; string yrmo = ddlYrmo.SelectedItem.Text; switch (source) { case "recon": dt = repObj.DF_DFRFClaimsRecon(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvResult.DataSource = dv; grdvResult.DataBind(); break; case "DFAging": //dt = ReconDAL.getDFAgingRpt(yrmo).Tables[0]; dt = repObj.DFnoRFAging(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvDFAging.DataSource = dv; grdvDFAging.DataBind(); break; case "DFRFAging": //dt = ReconDAL.getDFAgingRpt(yrmo).Tables[0]; dt = repObj.DFRFAging(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvDFRFAging.DataSource = dv; grdvDFRFAging.DataBind(); break; case "DFRFmismatchAging": //dt = ReconDAL.getDFAgingRpt(yrmo).Tables[0]; dt = repObj.getMismatchCF(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvDFRFmismatchAging.DataSource = dv; grdvDFRFmismatchAging.DataBind(); break; case "recon_matched": dt = ReconDAL.getMatchedDCNAmnt(yrmo, "Matched").Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvMatched.DataSource = dv; grdvMatched.DataBind(); break; case "recon_mismatched": dt = ReconDAL.getMatchedDCNAmnt(yrmo, "UnMatched").Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvMatched.DataSource = dv; grdvMatched.DataBind(); break; case "recon_unmatchDFRF": dt = ReconDAL.getRFDFUM(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvUnmatchedDFRF.DataSource = dv; grdvUnmatchedDFRF.DataBind(); break; case "recon_unmatchAnth": dt = ReconDAL.getClaimsUM(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvUnmatchedAnth.DataSource = dv; grdvUnmatchedAnth.DataBind(); break; } }