fix Abnormal Storate

This commit is contained in:
thuannd88
2024-10-22 18:18:50 +07:00
parent 7430effcf2
commit 01e63a0f4e
4 changed files with 52 additions and 19 deletions
+15 -3
View File
@@ -101,19 +101,26 @@ namespace SafeBagDE70.Admin
private void btnSoftImportantError_Click(object sender, RoutedEventArgs e)
{
var state = AppData.GetCDMState();
if(state.IsNotesInEscrow>0||
if (state.IsNotesInEscrow>0||
state.IsNotesInRejectPocket>0||
state.IsNotesInHopper>0)
{
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Red);
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
{
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Green);
lblCounterStatus.Text = "Đang thực hiện Reset lỗi";
Log.Information("[ADMIN] Reset CDM Error");
var bSuccess = AppData.ResetAbnormalStorage605();
if(bSuccess)
if (bSuccess)
{
Log.Information("[ADMIN] Reset CDM AbnormalStorage successfully");
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Green);
lblCounterStatus.Text = "Reset lỗi thành công";
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
Task.Run(() =>
@@ -124,7 +131,12 @@ namespace SafeBagDE70.Admin
lblCounterStatus.Text = "";
});
});
}
}
else
{
lblCounterStatus.Foreground = new SolidColorBrush(Colors.Red);
lblCounterStatus.Text = "Reset lỗi không thành công";
}
}
}
}