Example #1
0
 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();
     }));
 }
Example #2
0
        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();
            });
        }