protected void lnk_genDtlRpt_OnClick(object sender, EventArgs e) { string yrmo = ddlYrmo.SelectedItem.Text; CAExcelRpt xlobj = new CAExcelRpt(); CAClaimsDAL caobj = new CAClaimsDAL(); DataSet dsFinal = new DataSet(); dsFinal.Clear(); DataSet ds = new DataSet(); ds.Clear(); string filename = "CA_Claims_Recon_detail_" + yrmo; string[] sheetnames = { "matched_Check&Amt", "mismatched_Amounts", "unmatchedCheck_Anthem", "unmatchedCheck_BOA", "duplicate_checks" }; string[] titles = { "California Claims Reconciliation Matched Records by Check# and Amount for " + yrmo, "California Claims Reconciliation Mismatched Amount Records for " + yrmo, "California Claims Reconciliation Un-Matched Check Records from Anthem for " + yrmo, "California Claims Reconciliation Un-Matched Check Records from BOA for " + yrmo, "California Claims Reconciliation Duplicate Check Record Details for " + yrmo }; string[][] colsFormat = { new string[] { "string", "string", "checknum", "string", "string", "string", "string", "string", "decimal", "string", "string", "decimal", "decimal" }, new string[] { "string", "string", "checknum", "string", "string", "string", "string", "string", "decimal", "string", "string", "decimal", "decimal" }, new string[] { "checknum", "string", "string", "string", "string", "string", "string", "string", "decimal" }, new string[] { "checknum", "string", "string", "decimal" }, new string[] { "string", "checknum", "string", "string", "string", "string", "string", "string", "string", "string", "decimal", "decimal", "string" } }; try { ds = caobj.GetMatchedChecknAmtRecords(yrmo); ds.Tables[0].TableName = "matchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[0].TableName = "matchedTableF"; ds.Clear(); ds = caobj.GetAmtMismatchCheckRecords(yrmo); ds.Tables[0].TableName = "mismatchAmtTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[1].TableName = "mismatchAmtTableF"; ds.Clear(); ds = caobj.GetAnthMismatch(yrmo); ds.Tables[0].TableName = "AnthUnmatchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[2].TableName = "AnthUnmatchedTableF"; ds.Clear(); ds = caobj.GetBOAMismatch(yrmo); ds.Tables[0].TableName = "BOAUnmatchedTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[3].TableName = "BOAUnmatchedTableF"; ds.Clear(); ds = caobj.GetDupChecksDetails(yrmo); ds.Tables[0].TableName = "DupDtlTable"; dsFinal.Tables.Add(ds.Tables[0].Copy()); dsFinal.Tables[4].TableName = "DupDtlTableF"; ds.Clear(); xlobj.ExcelXMLRpt(dsFinal, filename, sheetnames, titles, colsFormat); } catch (Exception ex) { lbl_error.Text = "Error in generating CA Claims Report of matched and mismatched records for YRMO - " + yrmo + "<br />" + ex.Message; } }
private void SortGridView(string sortExpression, string direction, string source) { DataTable dt; DataView dv; string yrmo = ddlYrmo.SelectedItem.Text; CAClaimsDAL caobj = new CAClaimsDAL(); switch (source) { case "CF_match": dt = caobj.GetAmtMismatchAging(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvCF_match.DataSource = dv; grdvCF_match.DataBind(); break; case "CF_unmatch_Anth": dt = caobj.GetAnthMismatchAging(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvCF_unmatchAnth.DataSource = dv; grdvCF_unmatchAnth.DataBind(); break; case "CF_unmatch_BOA": dt = caobj.GetBOAMismatchAging(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvCF_unmatchBOA.DataSource = dv; grdvCF_unmatchBOA.DataBind(); break; case "CF_Dup": dt = caobj.GetDupsAging(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvCF_Dup.DataSource = dv; grdvCF_Dup.DataBind(); break; case "DtlMatched": dt = caobj.GetMatchedChecknAmtRecords(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlmat.DataSource = dv; grdv_dtlmat.DataBind(); break; case "DtlMismatch": dt = caobj.GetAmtMismatchCheckRecords(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlmismat.DataSource = dv; grdv_dtlmismat.DataBind(); break; case "DtlUnMatchedAnth": dt = caobj.GetAnthMismatch(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlunmatAnth.DataSource = dv; grdv_dtlunmatAnth.DataBind(); break; case "DtlUnMatchedBOA": dt = caobj.GetBOAMismatch(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlunmatBOA.DataSource = dv; grdv_dtlunmatBOA.DataBind(); break; case "DtlDup": dt = caobj.GetDupChecksDetails(yrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlDup.DataSource = dv; grdv_dtlDup.DataBind(); break; } }
protected void bindResult(string _src) { DataSet ds = new DataSet(); ds.Clear(); string yrmo = ddlYrmo.SelectedItem.Text; CAClaimsDAL caobj = new CAClaimsDAL(); switch (_src) { case "CF": mismatchCF.Visible = false; unmatchAnthCF.Visible = false; unmatchBOACF.Visible = false; DupCF.Visible = false; ds = caobj.GetAmtMismatchAging(yrmo); if (ds.Tables[0].Rows.Count == 0) { mismatchCF.Attributes.Add("style", "width:700px;height:50px"); } else { mismatchCF.Attributes.Add("style", "width:700px;height:250px"); } mismatchCF.Visible = true; grdvCF_match.DataSource = ds; grdvCF_match.DataBind(); ds.Clear(); ds = caobj.GetAnthMismatchAging(yrmo); if (ds.Tables[0].Rows.Count == 0) { unmatchAnthCF.Attributes.Add("style", "width:700px;height:50px"); } else { unmatchAnthCF.Attributes.Add("style", "width:700px;height:250px"); } unmatchAnthCF.Visible = true; grdvCF_unmatchAnth.DataSource = ds; grdvCF_unmatchAnth.DataBind(); ds.Clear(); ds = caobj.GetBOAMismatchAging(yrmo); if (ds.Tables[0].Rows.Count == 0) { unmatchBOACF.Attributes.Add("style", "width:700px;height:50px"); } else { unmatchBOACF.Attributes.Add("style", "width:700px;height:250px"); } unmatchBOACF.Visible = true; grdvCF_unmatchBOA.DataSource = ds; grdvCF_unmatchBOA.DataBind(); ds.Clear(); ds = caobj.GetDupsAging(yrmo); if (ds.Tables[0].Rows.Count == 0) { DupCF.Attributes.Add("style", "width:700px;height:50px"); } else { DupCF.Attributes.Add("style", "width:700px;height:250px"); } DupCF.Visible = true; grdvCF_Dup.DataSource = ds; grdvCF_Dup.DataBind(); ds.Clear(); break; case "detail": matchDtl.Visible = false; mismatchAmt.Visible = false; unmatchAnthDtl.Visible = false; unmatchBOADtl.Visible = false; ds = caobj.GetMatchedChecknAmtRecords(yrmo); if (ds.Tables[0].Rows.Count == 0) { matchDtl.Attributes.Add("style", "width:700px;height:50px"); } else { matchDtl.Attributes.Add("style", "width:700px;height:250px"); } matchDtl.Visible = true; grdv_dtlmat.DataSource = ds; grdv_dtlmat.DataBind(); ds.Clear(); ds = caobj.GetAmtMismatchCheckRecords(yrmo); if (ds.Tables[0].Rows.Count == 0) { mismatchAmt.Attributes.Add("style", "width:700px;height:50px"); } else { mismatchAmt.Attributes.Add("style", "width:700px;height:250px"); } mismatchAmt.Visible = true; grdv_dtlmismat.DataSource = ds; grdv_dtlmismat.DataBind(); ds.Clear(); ds = caobj.GetAnthMismatch(yrmo); if (ds.Tables[0].Rows.Count == 0) { unmatchAnthDtl.Attributes.Add("style", "width:700px;height:50px"); } else { unmatchAnthDtl.Attributes.Add("style", "width:700px;height:250px"); } unmatchAnthDtl.Visible = true; grdv_dtlunmatAnth.DataSource = ds; grdv_dtlunmatAnth.DataBind(); ds.Clear(); ds = caobj.GetBOAMismatch(yrmo); if (ds.Tables[0].Rows.Count == 0) { unmatchBOADtl.Attributes.Add("style", "width:700px;height:50px"); } else { unmatchBOADtl.Attributes.Add("style", "width:700px;height:250px"); } unmatchBOADtl.Visible = true; grdv_dtlunmatBOA.DataSource = ds; grdv_dtlunmatBOA.DataBind(); ds.Clear(); ds = caobj.GetDupChecksDetails(yrmo); if (ds.Tables[0].Rows.Count == 0) { DupDtl.Attributes.Add("style", "width:700px;height:50px"); } else { DupDtl.Attributes.Add("style", "width:700px;height:250px"); } DupDtl.Visible = true; grdv_dtlDup.DataSource = ds; grdv_dtlDup.DataBind(); break; } }