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.
 
 
 
 
 

65 lines
2.1 KiB

using Swift.DAL.SwiftDAL;
using Swift.web.Library;
using System;
using System.Data;
namespace Swift.web.Remit.Transaction.ThirdPartySync.TXNStatus
{
public partial class Manage : System.Web.UI.Page
{
private const string ViewFuntionId = "20176000";
private readonly StaticDataDdl _sdd = new StaticDataDdl();
private readonly RemittanceLibrary _sl = new RemittanceLibrary();
protected void Page_Load(object sender, EventArgs e)
{
_sl.CheckSession();
if (!IsPostBack)
Authenticate();
btnSearch.Attributes.Add("onclick", "return PreProcess();");
}
private void Authenticate()
{
_sdd.CheckAuthentication(ViewFuntionId);
}
private void LoadGridGlobal()
{
var _globalDao = new GlobalBankDao();
DataTable txnResult;
DbResult dbResult = _globalDao.GetStatus(GetStatic.GetUser(), trnNo.Text, out txnResult);
if (dbResult.ErrorCode != "0")
{
rptGrid.InnerHtml = "";
btnSync.Visible = false;
GetStatic.AlertMessage(Page, "Transaction not found");
return;
}
rptGrid.InnerHtml = Misc.DataTableToHtmlTable(ref txnResult);
hddDate.Value = DateTime.Today.ToShortDateString();
hddStatus.Value = dbResult.Msg;
btnSync.Visible = true;
}
protected void btnSearchClick(object sender, EventArgs e)
{
hddControlNo.Value = trnNo.Text;
LoadGridGlobal();
}
protected void btnSync_Click(object sender, EventArgs e)
{
DbResult dr = SyncStatus();
GetStatic.PrintMessage(Page, dr);
}
private DbResult SyncStatus()
{
var _globalDao = new GlobalBankDao();
var res = _globalDao.SyncStatus(GetStatic.GetUser(), hddControlNo.Value, hddDate.Value, hddStatus.Value);
var dbResult = new DbResult();
dbResult.SetError(res.ErrorCode, res.Msg, res.Id);
return dbResult;
}
}
}