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.
69 lines
2.3 KiB
69 lines
2.3 KiB
using Swift.DAL.BL.Remit.Transaction;
|
|
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;
|
|
using static Swift.web.Remit.Administration.ChangeReferral.CancelTxn;
|
|
|
|
namespace Swift.web.AgentNew.Transaction.CheckReferral
|
|
{
|
|
public partial class CheckReferral : System.Web.UI.Page
|
|
{
|
|
private const string ViewFunctionId = "20307000";
|
|
private readonly StaticDataDdl sd = new StaticDataDdl();
|
|
private readonly SwiftGrid _grid = new SwiftGrid();
|
|
private RemittanceLibrary rl = new RemittanceLibrary();
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
Authenticate();
|
|
if (!IsPostBack)
|
|
{
|
|
//fromDate.Text= DateTime.Now.ToString("yyyy-MM-dd");
|
|
var MethodName = Request.Form["MethodName"];
|
|
if (MethodName == "SearchTransaction")
|
|
SearchTransactionDetails();
|
|
}
|
|
GetStatic.ResizeFrame(Page);
|
|
Misc.MakeNumericTextbox(ref tranId);
|
|
|
|
}
|
|
private void Authenticate()
|
|
{
|
|
sd.CheckAuthentication(ViewFunctionId);
|
|
}
|
|
protected string GetUrlRoot()
|
|
{
|
|
return GetStatic.GetUrlRoot();
|
|
}
|
|
|
|
private void SearchTransactionDetails()
|
|
{
|
|
TxnResponse _resp = new TxnResponse();
|
|
string controlNo = Request.Form["controlNo"];
|
|
string tranNo = Request.Form["tranNo"];
|
|
var result = (new TranAgentReportDao().GetReferral(GetStatic.GetUser(), controlNo, tranNo));
|
|
if (result.Result.Tables[0].Rows.Count.ToString() == "0")
|
|
{
|
|
var dbresult = rl.ManageInvalidControlNoAttemptAjax(Page, GetStatic.GetUser(), "N");
|
|
_resp.ErrorCode = dbresult.ErrorCode;
|
|
_resp.Msg = dbresult.Msg;
|
|
GetStatic.JsonResponse(_resp, this);
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
_resp.ErrorCode = "0";
|
|
_resp.Msg = "";
|
|
GetStatic.JsonResponse(_resp, this);
|
|
}
|
|
}
|
|
}
|
|
}
|