Fixed PCRB attendees bug
This commit is contained in:
parent
40e7a3f8e0
commit
1946623c9e
@ -485,6 +485,20 @@ public class PCRBService : IPCRBService {
|
||||
int rowsAffected = await _dalService.ExecuteAsync(queryBuilder.ToString());
|
||||
|
||||
if (rowsAffected <= 0) throw new Exception("update failed in database");
|
||||
|
||||
IEnumerable<PCRBAttendee>? attendees = _cache.Get<IEnumerable<PCRBAttendee>>($"pcrbAttendees{attendee.PlanNumber}");
|
||||
if (attendees is not null) {
|
||||
foreach (PCRBAttendee cachedAttendee in attendees) {
|
||||
if (cachedAttendee.ID == attendee.ID) {
|
||||
cachedAttendee.Location = attendee.Location;
|
||||
cachedAttendee.Attended = attendee.Attended;
|
||||
cachedAttendee.JobTitle = attendee.JobTitle;
|
||||
cachedAttendee.AttendeeID = attendee.AttendeeID;
|
||||
cachedAttendee.Step = attendee.Step;
|
||||
}
|
||||
}
|
||||
_cache.Set($"pcrbAttendees{attendee.PlanNumber}", attendees, DateTimeOffset.Now.AddMinutes(15));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
_logger.LogError($"Unable to update attendee, because {ex.Message}");
|
||||
throw;
|
||||
|
File diff suppressed because it is too large
Load Diff
1139
MesaFabApproval.Client/Pages/PCRBSingle.razor.cs
Normal file
1139
MesaFabApproval.Client/Pages/PCRBSingle.razor.cs
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user