protected void BindRTAInitialReport() { try { pnlOrderReport.Visible = false; pnlFATCA.Visible = false; DataTable dtBindRTAInitialReport; if (txtFromDate.SelectedDate != null) { fromdate = DateTime.Parse(txtFromDate.SelectedDate.ToString()); } if (txtToDate.SelectedDate != null) { todate = DateTime.Parse(txtToDate.SelectedDate.ToString()); } if (ddlOrderType.SelectedValue == "1") { dtBindRTAInitialReport = onlineOrderBackOffice.GetRTAInitialReport(ddlType.SelectedValue.ToString(), fromdate, todate, 0, 0); if (Cache["RTAInitialReport" + advisorVo.advisorId] != null) { Cache.Remove("RTAInitialReport" + advisorVo.advisorId); } Cache.Insert("RTAInitialReport" + advisorVo.advisorId, dtBindRTAInitialReport); gvOrderReport.DataSource = dtBindRTAInitialReport; gvOrderReport.DataBind(); pnlOrderReport.Visible = true; pnlCustomerDetails.Visible = false; pnlFATCA.Visible = false; imgexportButton.Visible = true; btnDownload.Visible = false; } else if (ddlOrderType.SelectedValue == "3") { dtBindRTAInitialReport = onlineOrderBackOffice.GetCustomerDetails(adviserVo.advisorId, ddlType.SelectedValue.ToString(), fromdate, todate); if (Cache["gvCustomerDetails" + advisorVo.advisorId] != null) { Cache.Remove("gvCustomerDetails" + advisorVo.advisorId); } Cache.Insert("gvCustomerDetails" + advisorVo.advisorId, dtBindRTAInitialReport); gvCustomerDetails.DataSource = dtBindRTAInitialReport; gvCustomerDetails.DataBind(); pnlCustomerDetails.Visible = true; pnlFATCA.Visible = false; imgexportButton.Visible = true; pnlOrderReport.Visible = false; btnUpdate.Visible = true; btnDownload.Visible = false; } else if (ddlOrderType.SelectedValue == "2") { dtBindRTAInitialReport = onlineOrderBackOffice.GetRTAInitialReport(ddlType.SelectedValue.ToString(), fromdate, todate, 1, int.Parse(ddlAMC.SelectedValue)); if (Cache["FATCAReport" + advisorVo.advisorId] != null) { Cache.Remove("FATCAReport" + advisorVo.advisorId); } Cache.Insert("FATCAReport" + advisorVo.advisorId, dtBindRTAInitialReport); rgFATCA.DataSource = dtBindRTAInitialReport; rgFATCA.DataBind(); pnlFATCA.Visible = true; pnlCustomerDetails.Visible = false; pnlOrderReport.Visible = false; btnDownload.Visible = false; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "OnlineClientAccess.ascx.cs:BindRTAInitialReport()"); object[] objects = new object[1]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }