You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

70 lines
2.0 KiB

using Swift.DAL.BL.Remit.OFACManagement;
using Swift.web.Component.Grid;
using Swift.web.Component.Grid.gridHelper;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Swift.web.Remit.DJDetail
{
public partial class List : System.Web.UI.Page
{
private const string ViewFunctionId = "20490000";
private string sql;
private readonly SwiftGrid _grid = new SwiftGrid();
private readonly RemittanceLibrary _sl = new RemittanceLibrary();
OFACDao ofacDao = new OFACDao();
protected void Page_Load(object sender, EventArgs e)
{
Authenticate();
if (!IsPostBack)
{
}
LoadData();
}
private void Authenticate()
{
_sl.CheckAuthentication(ViewFunctionId);
}
private void LoadData()
{
var res = ofacDao.GetDJPersonAndEntity(GetStatic.GetUser());
LoadPerson(res.Tables[0]);
LoadEntity(res.Tables[1]);
}
private void LoadPerson(DataTable dt)
{
StringBuilder sb = new StringBuilder();
foreach (DataRow dr in dt.Rows)
{
sb.AppendLine("<tr>");
sb.AppendLine("<td>" + dr["records"] + "</td>");
sb.AppendLine("<td>" + dr["uploadDate"] + "</td>");
sb.AppendLine("</tr>");
}
person.InnerHtml = sb.ToString();
}
private void LoadEntity(DataTable dt)
{
StringBuilder sb = new StringBuilder();
foreach (DataRow dr in dt.Rows)
{
sb.AppendLine("<tr>");
sb.AppendLine("<td>" + dr["records"] + "</td>");
sb.AppendLine("<td>" + dr["uploadDate"] + "</td>");
sb.AppendLine("</tr>");
}
entity.InnerHtml = sb.ToString();
}
}
}