private void HandleDelete(EmployeeApproval current, Action action) { EmployeeApprovalService.DeleteEmployeeApproval(current.EmployeeId, current.ApprovalId, (entity, response) => ThreadHelper.ExecuteOnUI(() => { if (CheckResponse(response)) { current.SetError(response.ApiErrorParamName, response.ErrorMessage); return; } action.Invoke(); })); }
private void HandleCommit(EmployeeApproval current, EmployeeApproval result, IGSPServiceResponse response, Action action) { ThreadHelper.ExecuteOnUI(() => { if (CheckResponse(response)) { current.SetError(response.ApiErrorParamName, response.ErrorMessage); UpdateCommandsCanExecuteStatus(); return; } UpdateApprovals(); UpdateCurrentItem(result); action.Invoke(); UpdateCommandsCanExecuteStatus(); }); }