예제 #1
0
        private async Task LoadJobs()
        {
            await JobsListResolver.LoadJobsListSearch("null", "null", DateTime.MinValue, DateTime.MinValue, 0, 0);

            await JobsListResolver.LoadSavedJobs();

            await JobsListResolver.LoadAppliedJobs();

            // MyJobstap.BackgroundColor = Color.FromHex("#87c8ee");
        }
예제 #2
0
        public async Task BindData(bool reloadData = false, bool clearSerach = false)
        {
            if (clearSerach)
            {
                ZipCode     = null;
                enddate     = DateTime.Now;
                startdate   = DateTime.Now;
                minhourrate = 0;
                maxhourate  = 0;
                //JobListHelper.IsSearching = false;
            }
            if (IsLoadingData)
            {
                return;
            }

            //if (diff.TotalSeconds <= 2)
            //return;
            JobListHelper.LastScrollTime = DateTime.Now;


            LoadingIndicatorHelper.AddProgressDisplay();

            IsLoadingData = true;

            if (reloadData ||
                JobListHelper.SearchJobsModel == null ||
                JobListHelper.SearchJobsModel.result == null ||
                JobListHelper.SearchJobsModel.result.Count() == 0)
            {
                await JobsListResolver.LoadJobsListSearch(searchtext, ZipCode, startdate, enddate, (int)minhourvar, (int)maxhourate);
            }

            try
            {
                JobSearchBindcast = new ObservableCollection <JobDataModel>(JobListHelper.SearchJobsModel.result);
            }
            catch (Exception ex)
            {
                var logged = new LoggedException.LoggedException("Error in jobsearchviewmodel", ex);
                await logged.LoggAPI();
            }
            finally
            {
                JobsCounterHelper.NoOfCurrentJobs = JobSearchBindcast.Count();
                CurrentCounter = JobsCounterHelper.NoOfCurrentJobsText();
                Applied        = JobsCounterHelper.NoOfAppliedJobsText();
                Saved          = JobsCounterHelper.NoOFSavedJobsText();
                IsLoadingData  = false;
            }


            LoadingIndicatorHelper.HideIndicator();
        }