private async void OnChangeDepartmentCommand(Window window) { try { IsLoading = true; ReturnParameter = await _operationApiService.ChangeDepartment(Parameter, SelectedDepartment.Id, Priority); window.Close(); } catch (Exception e) { window.Close(); throw e; IsLoading = false; } }