diff --git a/UserControl/DepositSMUCv2.xaml.cs b/UserControl/DepositSMUCv2.xaml.cs index 6115b91..b3ea9b1 100644 --- a/UserControl/DepositSMUCv2.xaml.cs +++ b/UserControl/DepositSMUCv2.xaml.cs @@ -284,7 +284,7 @@ namespace SafeBagDE70 { EndSession(COUNTINGSTATE.AUTOEND,"Tự động kết thúc"); }); - EndTransaction(); + Log.Information("7. Timeout completed"); }); } @@ -1065,12 +1065,16 @@ namespace SafeBagDE70 } else { - 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); + 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}"; + 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; } } }