using System; using System.Collections.Generic; using Swift.web.Component.Grid; using Swift.web.Component.Grid.gridHelper; using Swift.web.Library; using Swift.DAL.SwiftDAL; using Swift.DAL.BL.Remit.Compliance; using System.Text; namespace Swift.web.Remit.RiskBaseAnalysis.RBACustomer { public partial class RBAExceptionRpt : System.Web.UI.Page { protected const string GridName = "gridRBACustomerRpt"; private string ViewFunctionId = "20191500"; private readonly SwiftGrid _grid = new SwiftGrid(); private readonly SwiftLibrary _sl = new SwiftLibrary(); private readonly RBACustomerDao obj = new RBACustomerDao(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Authenticate(); } } private void Authenticate() { _sl.CheckAuthentication(ViewFunctionId); } private void LoadGrid() { rpt_grid.InnerHtml = ""; var dt = obj.LoadRBAExceptionRpt(GetStatic.GetUser(), fromDate.Text, toDate.Text, country.Value, agent.Value, branch.Value, reportType.SelectedValue); int cnt = 0; var sb = new StringBuilder(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); for (int i = 0; i < dt.Rows.Count; i++) { try { ++cnt; sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); } catch (Exception ex) { GetStatic.AlertMessage(this, "Error Occurred.\\n"+ex.Message); } } sb.AppendLine("
RISKTXNCOMPLETEDPENDING
CDDEDDSTRCDDEDDSTR
" + dt.Rows[i]["RISK"] + "" + dt.Rows[i]["TXN"] + "" + dt.Rows[i]["CDD"] + "" + dt.Rows[i]["EDD"] + "" + dt.Rows[i]["STR"] + "" + dt.Rows[i]["P_CDD"] + "" + dt.Rows[i]["P_EDD"] + "" + dt.Rows[i]["P_STR"] + "
"); rpt_grid.InnerHtml = sb.ToString(); } protected void showReport_Click(object sender, EventArgs e) { if (fromDate.Text.Trim() == "" || toDate.Text.Trim() == "") { GetStatic.AlertMessage(this, "From and To date is required fields. Required field cannot be blank."); return; } if (reportType.SelectedValue == "") { GetStatic.AlertMessage(this, "Report type is required field. Required field cannot be blank."); return; } LoadGrid(); } } }