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(); }); } } }
public AddProcedureTypeGroupResponse(ProcedureTypeGroupSummary addedProcedureTypeGroupSummary) { this.AddedProcedureTypeGroupSummary = addedProcedureTypeGroupSummary; }
public UpdateProcedureTypeGroupResponse(ProcedureTypeGroupSummary updatedProcedureTypeGroupSummary) { this.UpdatedProcedureTypeGroupSummary = updatedProcedureTypeGroupSummary; }