This commit is contained in:
thuannd88
2024-09-06 10:15:39 +07:00
parent 7e927dfcc9
commit 8fb4e9ae92
8 changed files with 55 additions and 29 deletions
+29 -15
View File
@@ -619,14 +619,7 @@ namespace SafeBagDE70
AutoSerialGet();
bIsCounted = true;
Log.Information("After AutoCount: " + GetShortInforFromCountItems());
var state=GetCDMState();
if (state.IsError>0)
{
string str = "ĐÃ XẢY RA LỖI TRONG QUÁ TRÌNH NỘP TIỀN";
Log.Information(str);
DoCheck();
EndSession(COUNTINGSTATE.FULLIFSTORE, str);
}
});
@@ -1352,14 +1345,35 @@ namespace SafeBagDE70
Task.Run(() =>
{
taskCounting.Wait();
Dispatcher.Invoke(() =>
var state = GetCDMState();
if (state.IsError > 0)
{
btnCountStart.IsEnabled = true;
btnCheck.IsEnabled = true;
btnStoreStart.IsEnabled = true;
ResetTimers();
Log.Information("2. Count completed");
});
string str = "ĐÃ XẢY RA LỖI TRONG QUÁ TRÌNH NỘP TIỀN";
Log.Information(str);
DoCheck();
EndSession(COUNTINGSTATE.FULLIFSTORE, str);
}
else if (state.IsStackerFull>0) {
Dispatcher.Invoke(() =>
{
btnCheck.IsEnabled = true;
btnStoreStart.IsEnabled = true;
ResetTimers();
Log.Information("2. Count completed");
});
}
else
{
Dispatcher.Invoke(() =>
{
btnCountStart.IsEnabled = true;
btnCheck.IsEnabled = true;
btnStoreStart.IsEnabled = true;
ResetTimers();
Log.Information("2. Count completed");
});
}
});