Beispiel #1
0
        void EditProtocol()
        {
            if (SelectedProtocol.EnrollmentOrder == null)
            {
                SelectedProtocol.EnrollmentOrder = Order;
            }
            var vm        = new EnrollmentProtocolEditorViewModel(SelectedProtocol);
            var validator = new EnrollmentProtocolValidator(SelectedProtocol);

            if (DialogLayer.ShowEditor(EditingContent.EnrollmentProtocolEditor, vm, validator))
            {
                RebuildEnrollmentProtocol(SelectedProtocol, vm.ProtocolClaims);
                RaisePropertyChanged("Protocols");
            }
        }
Beispiel #2
0
        void AddProtocol()
        {
            var protocol = new EnrollmentProtocol();

            protocol.EnrollmentOrder = Order;
            var vm        = new EnrollmentProtocolEditorViewModel(protocol);
            var validator = new EnrollmentProtocolValidator(protocol);

            if (DialogLayer.ShowEditor(EditingContent.EnrollmentProtocolEditor, vm, validator))
            {
                protocol.EnrollmentOrder = null;
                Order.EnrollmentProtocols.Add(protocol);
                RebuildEnrollmentProtocol(protocol, vm.ProtocolClaims);
                RaisePropertyChanged("Protocols");
                SelectedProtocol = protocol;
            }
            else
            {
                Order.EnrollmentProtocols.Remove(protocol);
            }
        }