Retry lấy số tiền trong két

Hiển thị giao dịch trong log
This commit is contained in:
Nguyen Dinh Thuan
2024-09-27 14:40:35 +07:00
parent d648718824
commit 3b93564587
2 changed files with 21 additions and 5 deletions
+9 -2
View File
@@ -98,10 +98,16 @@ namespace SafeBagDE70
string? transactionCode = null;
if (AppData.IsAuthenticated)
{
transactionCode = AppData.GetTransactionCode();
lblUser.Content = $"Xin chào khách hàng: {AppData.CurrentCustomerAccount.Name} (Gian hàng {AppData.CurrentCustomerAccount.CustomerId})";
lblTransactionCode.Content = $"Mã GD: {transactionCode}";
AppData.IsInTransaction = true;
var str = $"MÃ GD: {AppData.GetTransactionCode()} " +
$"\r\nMÁY: {Environment.MachineName}" +
$"\r\nMÃ NV: {AppData.CurrentCustomerAccount.CustomerId}";
Log.Information(str);
}
cCmdRsp = new CCmdRsp(serialPortDE70);
AppData.cCmdRsp = cCmdRsp;
@@ -1040,7 +1046,7 @@ namespace SafeBagDE70
var str = "BEFORE STORE [CASSETTE]" + AppData.GetNotesString(previousCassetData);
str += "\r\nSTORED: " + GetQuantityFromSessions(sessions, true);
str += "\r\nSTACKER: " + GetQuantityFromSessions(sessions, false);
Log.Information(str);
AppData.DeviceStatus.Description = str;
APIModels.SendEvent(AppData.DeviceStatus);
@@ -1072,13 +1078,14 @@ namespace SafeBagDE70
}
else
{
Log.Information(str);
Dispatcher.Invoke(() =>
{
str = $"PHIÊN GIAO DỊCH KHÔNG HỢP LỆ (SỐ TIỀN GIAO DỊCH KHÔNG KHỚP), VUI LÒNG BÁO CÁO LẠI CHI NHÁNH" +
$"\r\n MÃ GD: {AppData.GetTransactionCode()} " +
$"\r\nMÁY: {Environment.MachineName}" +
$"\r\nMÃ NV: {AppData.CurrentCustomerAccount.CustomerId}";
Log.Information(str);
ShowError(str);
});