public void ReSetTaskDetail() { List <int> TaskIds = new List <int>(); if (AppSession.TaskIds != null && AppSession.TaskIds.Count > 0) { TaskIds = AppSession.TaskIds; } if (AppSession.ExecutingTaskId != null && AppSession.ExecutingTaskId != 0) { TaskIds.Add(AppSession.ExecutingTaskId); } Result result = ConnectionService.ExitCurrentTask( new GetNextTaskModel { execTaskId = TaskIds, LastRoleID = AppSession.LastRoleId, LastUserID = AppSession.UserId, WaveID = AppSession.CurrentWaveId, IsHire = AppSession.IsHireWave }); if (result.Status) { AppSession.ExecutingTaskId = 0; AppSession.LastRoleId = 0; AppSession.CurrentWaveId = 0; } }
private async Task <object> Back() { try { List <int> TaskIds = new List <int>(); if (AppSession.TaskIds != null && AppSession.TaskIds.Count > 0) { TaskIds = AppSession.TaskIds; } if (AppSession.ExecutingTaskId != 0) { TaskIds.Add(AppSession.ExecutingTaskId); } Result result = ConnectionService.ExitCurrentTask( new GetNextTaskModel { execTaskId = TaskIds, LastRoleID = AppSession.LastRoleId, LastUserID = AppSession.UserId, WaveID = AppSession.CurrentWaveId, IsHire = AppSession.IsHireWave }); if (result.Status) { AppSession.ExecutingTaskId = 0; AppSession.LastRoleId = 0; await _navigationService.PushAsync(new FinePickSearchPage()); } } catch (Exception ex) { await _navigationService.DisplayAlert("Alert.", ex.Message, "Ok"); } return(null); }
private void Back(bool goToBulkSearch) { try { List <int> TaskIds = new List <int>(); if (AppSession.TaskIds != null && AppSession.TaskIds.Count > 0) { TaskIds = AppSession.TaskIds; } if (AppSession.ExecutingTaskId != 0) { TaskIds.Add(AppSession.ExecutingTaskId); } Result result = ConnectionService.ExitCurrentTask( new GetNextTaskModel { execTaskId = TaskIds, LastRoleID = AppSession.LastRoleId == 0 ? 0 : AppSession.LastRoleId, LastUserID = AppSession.UserId == 0 ? 0 : AppSession.UserId, WaveID = AppSession.CurrentWaveId == 0 ? 0 : AppSession.CurrentWaveId, IsHire = AppSession.IsHireWave ? false : AppSession.IsHireWave }); if (result.Status) { AppSession.ExecutingTaskId = 0; AppSession.LastRoleId = 0; AppSession.CurrentWaveId = 0; if (goToBulkSearch) { _navigationService.PushAsync(new BulkPickSearchPage()); } } } catch (Exception ex) { _navigationService.DisplayAlert("Task Error", ex.Message, "Ok"); } }