Exemplo n.º 1
0
 public bool insertRecommenderJob(DataResult avgs)
 {
     try
     {
         bool flag = false;
         NewElasticService.ServiceWCFClient ws = new NewElasticService.ServiceWCFClient();
         for (int n = 0; n < avgs.Number_top_jobs; n++)
         {
             NewElasticService.RecommendedJobDto job = new NewElasticService.RecommendedJobDto();
             job.RecruiteeId           = new Guid(avgs.User_profile.UserID);
             job.JobId                 = new Guid(avgs.TopJobNames[n]);
             job.PredictedRankingValue = avgs.Mylist.ElementAt(n).PredRecJob;
             flag = ws.insertRecommendedJob(job);
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
        public bool insertRecommenderJob(DataResult avgs)
        {
            try
            {
                bool flag = false;
                NewElasticService.ServiceWCFClient ws = new NewElasticService.ServiceWCFClient();
                for (int n = 0; n < avgs.Number_top_jobs; n++)
                {
                    NewElasticService.RecommendedJobDto job = new NewElasticService.RecommendedJobDto();
                    job.RecruiteeId = new Guid(avgs.User_profile.UserID);
                    job.JobId = new Guid(avgs.TopJobNames[n]);
                    job.PredictedRankingValue = avgs.Mylist.ElementAt(n).PredRecJob;
                    flag = ws.insertRecommendedJob(job);

                }
                return true;
            }
            catch(Exception ex)
            {
                return false;
            }
        }