sửa lỗi báo kết thúc giao dịch trong EndSession

This commit is contained in:
thuannd88
2024-09-21 11:18:45 +07:00
parent 92ed10467e
commit d3fc7ba284
+11 -4
View File
@@ -284,7 +284,7 @@ namespace SafeBagDE70
{
EndSession(COUNTINGSTATE.AUTOEND,"Tự động kết thúc");
});
EndTransaction();
Log.Information("7. Timeout completed");
});
}
@@ -1064,13 +1064,17 @@ 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);
});
}
Thread.Sleep(1000);
}
@@ -1254,7 +1258,7 @@ namespace SafeBagDE70
ResetSessions();
StartWelcomeTimer();
}
else if(strMessage!=null)
else if(strMessage!=null)//Không nộp tiền nhưng yêu cầu thông báo trước khi kết thúc
{
var strNotify = "";
if (AppData.CurrentCustomerAccount != null)
@@ -1274,12 +1278,14 @@ namespace SafeBagDE70
ResetSessions();
StartWelcomeTimer();
}
else
else//Không nộp tiền và không có thông báo --> kết thúc luôn
{
mainWindow.ShowWelcomeScreen();
}
if (AppData.CurrentCustomerAccount != null)
AppData.CurrentCustomerAccount.TransactionCode = "";
AppData.IsInTransaction = false;
//SendData2Server
}
catch (Exception ex)
@@ -1642,6 +1648,7 @@ namespace SafeBagDE70
Log.Information("6. Exit Completed");
else
Log.Information("6. Exit failed");
AppData.IsInTransaction = false;
}
}
}