Write log after store

This commit is contained in:
thuannd88
2024-09-27 15:02:24 +07:00
parent 3b93564587
commit a40462a7b6
+7 -5
View File
@@ -1043,7 +1043,7 @@ namespace SafeBagDE70
var previousCassetData = AppData.GetCassetteData();
var str = "BEFORE STORE [CASSETTE]" + AppData.GetNotesString(previousCassetData);
var str = "BEFORE STORE \r\n[CASSETTE]" + AppData.GetNotesString(previousCassetData);
str += "\r\nSTORED: " + GetQuantityFromSessions(sessions, true);
str += "\r\nSTACKER: " + GetQuantityFromSessions(sessions, false);
Log.Information(str);
@@ -1055,8 +1055,10 @@ namespace SafeBagDE70
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_STORESTART);
bSuccess = WaitUntilCountReady(10);
var newCasstData = AppData.GetCassetteData();
AppData.DeviceStatus.Description = "AFTER STORE [CASSETTE]" + AppData.GetNotesString(newCasstData);
str = "AFTER STORE \r\n[CASSETTE]" + AppData.GetNotesString(newCasstData);
Log.Information(str);
AppData.DeviceStatus.Description = str;
APIModels.SendEvent(AppData.DeviceStatus);
bool bValid = CheckStoreValid(previousCassetData, newCasstData, sessions);
@@ -1069,11 +1071,11 @@ namespace SafeBagDE70
item.IsStored = true;
}
quantityStored = UpdateTotalQuantity();
Log.Information("Stored " + GetShortInforFromCountItems());
Log.Information("STORE SUCCESS: " + GetShortInforFromCountItems());
}
else
{
Log.Error("Store FAIL " + GetShortInforFromCountItems());
Log.Error("STORE FAIL: " + GetShortInforFromCountItems());
}
}
else