|
|
|
|
@ -263,15 +263,19 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
|
private int repeatCount = 1; |
|
|
|
|
public void sendRepeatSubmit() |
|
|
|
|
{ |
|
|
|
|
if (n5Core == null || !n5CoreInitSuccess) |
|
|
|
|
if (n5Core == null) |
|
|
|
|
{ |
|
|
|
|
n5Core = n5coredll.N5Core.getInstance(); |
|
|
|
|
} |
|
|
|
|
//if (n5Core == null || !n5CoreInitSuccess) |
|
|
|
|
//{ |
|
|
|
|
n5Core = n5coredll.N5Core.getInstance(); |
|
|
|
|
int initResult = n5Core.initN5Core(portName, baudRate, dataBits, stopBits, parity, timeOut); |
|
|
|
|
if (initResult == 0) |
|
|
|
|
{ |
|
|
|
|
n5CoreInitSuccess = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//} |
|
|
|
|
/* |
|
|
|
|
if (!n5CoreInitSuccess) |
|
|
|
|
{ |
|
|
|
|
@ -301,15 +305,15 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
portName = this.portNameComboBox.Text; |
|
|
|
|
if (n5Core == null || !n5CoreInitSuccess) |
|
|
|
|
if(n5Core == null) |
|
|
|
|
{ |
|
|
|
|
n5Core = n5coredll.N5Core.getInstance(); |
|
|
|
|
} |
|
|
|
|
int initResult = n5Core.initN5Core(portName, baudRate, dataBits, stopBits, parity, timeOut); |
|
|
|
|
//if (initResult == 0) |
|
|
|
|
//{ |
|
|
|
|
n5CoreInitSuccess = true; |
|
|
|
|
//} |
|
|
|
|
} |
|
|
|
|
if (!n5CoreInitSuccess) |
|
|
|
|
{ |
|
|
|
|
this.requestStrByThead = "n5coredll init fail."; |
|
|
|
|
@ -350,8 +354,10 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
|
qrValueTextBoxValue = this.qrValueTextBox.Text; |
|
|
|
|
panTextBoxValue = this.panTextBox.Text; |
|
|
|
|
expDateTextBoxValue = this.expDateTextBox.Text; |
|
|
|
|
|
|
|
|
|
txnIdForSale = this.getTxnId(); |
|
|
|
|
if (this.ecrTxnIdTextBox.Text == "") |
|
|
|
|
txnIdForSale = this.getTxnId(); |
|
|
|
|
else |
|
|
|
|
txnIdForSale = this.ecrTxnIdTextBox.Text; |
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForSale + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentAppId = " + paymentAppIdComboBoxValue + "\n qrValue = " + qrValueTextBoxValue; |
|
|
|
|
showResult(); |
|
|
|
|
addLog("txnId = " + txnIdForSale + ", txnAmt = " + txnAmtTextBoxValue + ", paymentAppId = " + paymentAppIdComboBoxValue + ",qrValue = " + qrValueTextBoxValue); |
|
|
|
|
@ -514,26 +520,15 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
|
} |
|
|
|
|
else if ("Retrieval".Equals(this.thisEvent)) |
|
|
|
|
{ |
|
|
|
|
if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim())) |
|
|
|
|
{ |
|
|
|
|
this.requestStrByThead = "Please input parameter."; |
|
|
|
|
this.jsonResultByThead = "Please input parameter."; |
|
|
|
|
showResult(); |
|
|
|
|
this.ecrTxnIdTextBox.Focus(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
ecrTxnIdTextBoxValue = this.ecrTxnIdTextBox.Text; |
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n ecrTxnId = " + ecrTxnIdTextBoxValue; |
|
|
|
|
showResult(); |
|
|
|
|
addLog("ecrTxnId = " + ecrTxnIdTextBoxValue); |
|
|
|
|
ecrTxnIdTextBoxValue = this.ecrTxnIdTextBox.Text; |
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n ecrTxnId = " + ecrTxnIdTextBoxValue; |
|
|
|
|
showResult(); |
|
|
|
|
addLog("ecrTxnId = " + ecrTxnIdTextBoxValue); |
|
|
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 180000); |
|
|
|
|
this.retrievalRequestMsg = this.requestStrByThead; |
|
|
|
|
Thread th = new Thread(requestRetrievalThead); |
|
|
|
|
th.Start(); |
|
|
|
|
} |
|
|
|
|
//jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 180000); |
|
|
|
|
this.retrievalRequestMsg = this.requestStrByThead; |
|
|
|
|
Thread th = new Thread(requestRetrievalThead); |
|
|
|
|
th.Start(); |
|
|
|
|
} |
|
|
|
|
else if ("HealthCheck".Equals(this.thisEvent)) |
|
|
|
|
{ |
|
|
|
|
@ -779,7 +774,7 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
|
this.qrValueTextBox.IsEnabled = true; |
|
|
|
|
this.panTextBox.IsEnabled = true; |
|
|
|
|
this.expDateTextBox.IsEnabled = true; |
|
|
|
|
this.ecrTxnIdTextBox.IsEnabled = false; |
|
|
|
|
this.ecrTxnIdTextBox.IsEnabled = true; |
|
|
|
|
this.batchIdTextBox.IsEnabled = false; |
|
|
|
|
this.settleDateTextBox.IsEnabled = false; |
|
|
|
|
} |
|
|
|
|
|