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.
 
 
 
 
 

68 lines
2.2 KiB

using Swift.DAL.Remittance.LawsonDeposits;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Swift.web.AgentNew.Administration.CustomerSetup.LawsonCardAgent
{
public partial class LawsonCardAgent : System.Web.UI.Page
{
private readonly RemittanceLibrary _sl = new RemittanceLibrary();
private readonly StaticDataDdl _sdd = new StaticDataDdl();
private readonly LawsonDepositDao _cd = new LawsonDepositDao();
private const string ViewFunctionId = "42100000";
private const string ApproveFunctionId = "42100010";
protected void Page_Load(object sender, EventArgs e)
{
Authenticate();
if (!IsPostBack)
{
PopulateDDL();
}
}
private void Authenticate()
{
_sl.CheckAuthentication(ViewFunctionId);
}
private void PopulateDDL()
{
var user = GetStatic.GetUser();
_sdd.SetDDL(ref ddlSearchBy, "exec proc_sendPageLoadData @flag='search-cust-by'", "VALUE", "TEXT", "", "");
}
protected void btnAssignLawsonCard_Click(object sender, EventArgs e)
{
var customerId = txtSearchData.Value;
var confimCardNumber = Request.Form["confirmCardNumber"];
var cardNo = Request.Form["cardNumber"];
if (string.IsNullOrEmpty(customerId))
{
GetStatic.AlertMessage(this, "Please select a customer");
}
if (string.IsNullOrEmpty(confimCardNumber))
{
GetStatic.AlertMessage(this, "Please select a customer");
}
var dbResult = _cd.AssignLawsonCard(GetStatic.GetUser(), customerId, cardNo);
//if(dbResult.ErrorCode == "0")
//{
GetStatic.AlertMessage(this, dbResult.Msg);
txtSearchData.Value = "";
txtSearchData.Text = "";
confirmCardNumber.Text = "";
cardNumber.Text = "";
//}
//else
//{
// GetStatic.AlertMessage(this, dbResult.Msg);
//}
}
}
}