Пример #1
0
        void HandleUpdateViolation(object sender, ProtocolViolationEventArgs e)
        {
            var assdVM = ((List <ParticipantListItemViewModel>)AllParticipants.SourceCollection)
                         .First(p => p.Id == e.Violation.ParticipantId);

            AllParticipants.EditItem(assdVM);
            assdVM.RecalculateDataRequired();
            AllParticipants.CommitEdit();
        }
Пример #2
0
        void HandleAddOrUpdateViolation(object sender, ProtocolViolationEventArgs e)
        {
            var assdVM = ((List <ParticipantListItemViewModel>)AllParticipants.SourceCollection)
                         .First(p => p.Id == e.Violation.ParticipantId);

            AllParticipants.EditItem(assdVM);
            if (e.EventType == CRUD.Updated)
            {
                assdVM.ProtocolViolations.Remove(assdVM.ProtocolViolations.First(v => v.Id == e.Violation.Id));
            }
            assdVM.ProtocolViolations.Add(e.Violation);
            assdVM.RecalculateDataRequired();
            AllParticipants.CommitEdit();
        }
Пример #3
0
 void _repository_ProtocolViolationAddOrUpdate(object sender, ProtocolViolationEventArgs e)
 {
     handleParrticipantUpdated(_repository.FindParticipantAndCollections(e.Violation.ParticipantId));
 }