コード例 #1
0
        public void Accept()
        {
            if (this.HasValidationErrors)
            {
                this.ShowValidation(true);
            }
            else
            {
                try
                {
                    _editedItemDetail.ProcedureTypes.Clear();
                    _editedItemDetail.ProcedureTypes.AddRange(_selectedProcedureTypes.Items);

                    Platform.GetService(
                        delegate(IProcedureTypeGroupAdminService service)
                    {
                        if (_isNew)
                        {
                            var response =
                                service.AddProcedureTypeGroup(new AddProcedureTypeGroupRequest(_editedItemDetail));
                            _editedItemEntityRef = response.AddedProcedureTypeGroupSummary.ProcedureTypeGroupRef;
                            _editedItemSummary   = response.AddedProcedureTypeGroupSummary;
                        }
                        else
                        {
                            var response =
                                service.UpdateProcedureTypeGroup(new UpdateProcedureTypeGroupRequest(_editedItemEntityRef, _editedItemDetail));
                            _editedItemEntityRef = response.UpdatedProcedureTypeGroupSummary.ProcedureTypeGroupRef;
                            _editedItemSummary   = response.UpdatedProcedureTypeGroupSummary;
                        }
                    });

                    this.Exit(ApplicationComponentExitCode.Accepted);
                }
                catch (Exception e)
                {
                    ExceptionHandler.Report(e, SR.ExceptionSaveProcedureTypeGroup, this.Host.DesktopWindow,
                                            delegate
                    {
                        this.ExitCode = ApplicationComponentExitCode.Error;
                        this.Host.Exit();
                    });
                }
            }
        }
コード例 #2
0
 public AddProcedureTypeGroupResponse(ProcedureTypeGroupSummary addedProcedureTypeGroupSummary)
 {
     this.AddedProcedureTypeGroupSummary = addedProcedureTypeGroupSummary;
 }
コード例 #3
0
 public UpdateProcedureTypeGroupResponse(ProcedureTypeGroupSummary updatedProcedureTypeGroupSummary)
 {
     this.UpdatedProcedureTypeGroupSummary = updatedProcedureTypeGroupSummary;
 }
コード例 #4
0
 public UpdateProcedureTypeGroupResponse(ProcedureTypeGroupSummary updatedProcedureTypeGroupSummary)
 {
     this.UpdatedProcedureTypeGroupSummary = updatedProcedureTypeGroupSummary;
 }
コード例 #5
0
 public AddProcedureTypeGroupResponse(ProcedureTypeGroupSummary addedProcedureTypeGroupSummary)
 {
     this.AddedProcedureTypeGroupSummary = addedProcedureTypeGroupSummary;
 }