add resetAbnormal Error

This commit is contained in:
Nguyen Dinh Thuan
2024-10-22 16:09:11 +07:00
parent d31c530392
commit d0abb5cca6
3 changed files with 48 additions and 9 deletions
+26 -1
View File
@@ -100,7 +100,32 @@ namespace SafeBagDE70.Admin
private void btnSoftImportantError_Click(object sender, RoutedEventArgs e)
{
var state = AppData.GetCDMState();
if(state.IsNotesInEscrow>0||
state.IsNotesInRejectPocket>0||
state.IsNotesInHopper>0)
{
lblCounterStatus.Text = "Vẫn còn tiền trong máy, đề nghị lấy tiền ra khỏi các ngăn và kiểm tra tiền kẹt";
}
else
{
Log.Information("[ADMIN] Reset CDM Error");
var bSuccess = AppData.ResetAbnormalStorage605();
if(bSuccess)
{
Log.Information("[ADMIN] Reset CDM AbnormalStorage successfully");
lblCounterStatus.Text = "Reset lỗi thành công";
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
Task.Run(() =>
{
Thread.Sleep(10000);
Dispatcher.Invoke(() =>
{
lblCounterStatus.Text = "";
});
});
}
}
}
}
}