private void save() { if (!jobPositionInPeriod.Validate()) { return; } ShowBusyIndicator(); if (actionType == ActionType.AddJobPositionInPeriod) { jobPositionInPeriodService.AddJobPositionInPeriod((res, exp) => appController.BeginInvokeOnDispatcher(() => { HideBusyIndicator(); if (exp != null) { appController.HandleException(exp); } else { FinalizeAction(); } }), jobPositionInPeriod); } else if (actionType == ActionType.ModifyJobPositionInPeriod) { jobPositionInPeriodService.UpdateJobPositionInPeriod((res, exp) => appController.BeginInvokeOnDispatcher(() => { HideBusyIndicator(); if (exp != null) { appController.HandleException(exp); } else { FinalizeAction(); } }), jobPositionInPeriod); } }