private bool getNewRandomJob()
        {
            double price   = 0;
            bool   success = Double.TryParse(Hidden_Price.Value, out price);

            if (!success)
            {
                price = 0;
            }
            SatyamTaskTableAccess taskTableDB = new SatyamTaskTableAccess();
            SatyamTaskTableEntry  entry       = null;

            //Thread.Sleep(5000);
            int maxDoneScore = TaskConstants.MULTI_OBJECT_LOCALIZATION_AND_LABLING_MAX_DONE_SCORE;

            if (SubmitButton.Enabled == true)
            {
                //entry = taskTableDB.getMinimumTriedNewEntryForWorkerIDByTemplateAndPrice(Hidden_AmazonWorkerID.Value,
                //    TaskConstants.Detection_Image_MTurk, price);
                entry = taskTableDB.getMinimumTriedNewEntryForWorkerIDByTemplateAndPriceAndMaxDoneScore(Hidden_AmazonWorkerID.Value,
                                                                                                        TaskConstants.Detection_Image_MTurk, price, MaxDoneScore: maxDoneScore);
            }
            else
            {
                //entry = taskTableDB.getMinimumTriedEntryByTemplate(TaskConstants.Detection_Image_MTurk);
                entry = taskTableDB.getMinimumTriedEntryByTemplateAndMaxDoneScore(TaskConstants.Detection_Image_MTurk, MaxDoneScore: maxDoneScore);
            }

            if (entry == null)
            {
                taskTableDB.close();
                return(false);
            }
            //doneScore = entry.DoneScore;
            //taskTableDB.IncrementDoneScore(entry.ID);
            taskTableDB.close();

            SatyamTask task = JSonUtils.ConvertJSonToObject <SatyamTask>(entry.TaskParametersString);
            string     uri  = task.SatyamURI;

            DisplayImage.ImageUrl = uri;

            SatyamJob jobDefinitionEntry = task.jobEntry;
            MultiObjectLocalizationAndLabelingSubmittedJob job = JSonUtils.ConvertJSonToObject <MultiObjectLocalizationAndLabelingSubmittedJob>(jobDefinitionEntry.JobParameters);

            List <string> categories = job.Categories;

            CategorySelection_RadioButtonList.Items.Clear();
            for (int i = 0; i < categories.Count; i++)
            {
                ListItem l = new ListItem(categories[i]);
                CategorySelection_RadioButtonList.Items.Add(l);
            }

            if (job.Description != "")
            {
                DescriptionPanel.Visible = true;
                DescriptionTextPanel.Controls.Add(new LiteralControl(job.Description));
            }

            Hidden_BoundaryLines.Value = JSonUtils.ConvertObjectToJSon(job.BoundaryLines);

            Hidden_TaskEntryString.Value = JSonUtils.ConvertObjectToJSon <SatyamTaskTableEntry>(entry);
            Hidden_PageLoadTime.Value    = DateTime.Now.ToString();
            NoLabeled.Text           = Hidden_NoImagesDone.Value;
            Hidden_TasksPerJob.Value = jobDefinitionEntry.TasksPerJob.ToString();

            /////////////////////////////////Load Previous Turker Results
            //MultiObjectLocalizationAndLabelingResult res = LoadLatestTurkerResult(entry);

            ///////////////////////////////Load Previous Aggregation Results
            MultiObjectLocalizationAndLabelingResult res = LoadLatestProgressiveAggregationResult(entry);

            //TFServing Backend
            if (res == null && TFServingBackend)
            {
                res = LoadTFServingResult(entry);
                Hidden_PrevResultID.Value = "-1"; // means TF
            }

            if (res == null)
            {
                Hidden_PrevResults.Value  = "[]";
                Hidden_PrevResultID.Value = 0.ToString();
            }
            else
            {
                string prevBoxes = JSonUtils.ConvertObjectToJSon(res.objects);
                Hidden_ImageHeight.Value = res.imageHeight.ToString();
                Hidden_ImageWidth.Value  = res.imageWidth.ToString();
                Hidden_PrevResults.Value = prevBoxes;
            }
            return(true);
        }