Esempio n. 1
0
        public static async Task LoadAppliedJobs()
        {
            try
            {
                JobSavedRestClient  js          = new JobSavedRestClient();
                List <JobDataModel> newJobsList = await js.GetSavedJobs(URLConfig.AppliedJobsurl);

                newJobsList = await BindJobsData(newJobsList);

                if (newJobsList != null && newJobsList.Count > 0)
                {
                    foreach (var item in newJobsList)
                    {
                        if (JobListHelper.AppliedJobsModel.Any(d => d.Id == item.Id) == false)
                        {
                            JobListHelper.AppliedJobsModel.Add(item);
                        }
                    }

                    JobListHelper.AppliedJobsModel = JobListHelper.AppliedJobsModel.OrderByDescending(d => d.CreatedDate).ToList();
                }
            }
            catch (Exception ex)
            {
                var logged = new LoggedException.LoggedException("Error while trying to bind applied jobs models", ex);
                await logged.LoggAPI();
            }
        }
Esempio n. 2
0
        public static async Task LoadSavedJobs()
        {
            try
            {
                JobSavedRestClient js = new JobSavedRestClient();


                List <JobDataModel> newJobsList = await js.GetSavedJobs(URLConfig.SavedJobsUrl);

                newJobsList = await BindJobsData(newJobsList);

                if (newJobsList != null && newJobsList.Count > 0)
                {
                    JobListHelper.SavedJobsModel = newJobsList.OrderByDescending(d => d.SavedDate).ToList();
                }
            }
            catch (Exception ex)
            {
                var logged = new LoggedException.LoggedException("Error while trying to bind saved jobs models", ex);
                await logged.LoggAPI();
            }
        }