- EndTransaction cho kết thúc tự động
This commit is contained in:
@@ -270,7 +270,7 @@ namespace SafeBagDE70
|
||||
|
||||
private void EndSessionTimer_Tick(object? sender, EventArgs e)
|
||||
{
|
||||
Log.Information("7. Timout starting");
|
||||
Log.Information("7. Timeout starting");
|
||||
mainWindow.ShowEndSessionScreen();
|
||||
StopTimers();
|
||||
DoStoreStart();
|
||||
@@ -284,7 +284,8 @@ namespace SafeBagDE70
|
||||
{
|
||||
EndSession(COUNTINGSTATE.AUTOEND,"Tự động kết thúc");
|
||||
});
|
||||
Log.Information("7. Timout completed");
|
||||
EndTransaction();
|
||||
Log.Information("7. Timeout completed");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1197,8 +1198,8 @@ namespace SafeBagDE70
|
||||
|
||||
//Remove sessions with store flag is false
|
||||
|
||||
sessions.RemoveAll(item => !item.IsStored);
|
||||
UpdateListViewCountItems();
|
||||
sessions.RemoveAll(item => !item.IsStored);//Xóa các GD chưa lưu
|
||||
UpdateListViewCountItems(); //Cập nhật lại danh sách hiển thị
|
||||
|
||||
var totalQuantity = lvCountItems[10].Quantity;
|
||||
var totalValue = lvCountItems[10].Value;
|
||||
@@ -1209,8 +1210,6 @@ namespace SafeBagDE70
|
||||
serialPortDE70.DiscardInBuffer();
|
||||
serialPortDE70.DiscardOutBuffer();
|
||||
|
||||
|
||||
|
||||
if (double.Parse(totalValue) > 0)
|
||||
{
|
||||
var data2Send = new CountingData2Send
|
||||
@@ -1224,7 +1223,7 @@ namespace SafeBagDE70
|
||||
CountingState= (int)_CountingState
|
||||
};
|
||||
|
||||
SyncData(data2Send);
|
||||
SyncData(data2Send);//Lưu CSDL và đồng bộ
|
||||
//Reset all and ready to next session
|
||||
|
||||
if (printerFlag == true)
|
||||
@@ -1235,7 +1234,6 @@ namespace SafeBagDE70
|
||||
|
||||
}
|
||||
|
||||
|
||||
String strNotify = $"BẠN VỪA THỰC HIỆN NỘP TIỀN VÀO MÁY CDM:\r\n"
|
||||
+ $"SỐ LƯỢNG TỜ: {totalQuantity}\r\n"
|
||||
+ $"SỐ TIỀN: {totalValue} VND\r\n";
|
||||
@@ -1255,7 +1253,6 @@ namespace SafeBagDE70
|
||||
});
|
||||
ResetSessions();
|
||||
StartWelcomeTimer();
|
||||
|
||||
}
|
||||
else if(strMessage!=null)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace SafeBagDE70.Model
|
||||
namespace SafeBagDE70.old
|
||||
{
|
||||
public class KeyModel
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
using SafeBagDE70.Model;
|
||||
using SafeBagDE70.old;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using SafeBagDE70.Model;
|
||||
using SafeBagDE70.old;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
Reference in New Issue
Block a user