Exemple #1
0
        public void Edit(JobSeekerLanguagesViewModel jobSeekerLanguagesViewModel)
        {
            var seekerLanguageToUpdate = jobSeekerLangaugeRepository.FindByConditionAsNoTracking(c => c.LanguageId.Equals(jobSeekerLanguagesViewModel.LanguageId) &&
                                                                                                 c.JobSeekerId.Equals(jobSeekerLanguagesViewModel.JobSeekerId)).FirstOrDefault();

            seekerLanguageToUpdate.LanguageLevelId = jobSeekerLanguagesViewModel.LanguageLevelId;

            jobSeekerLangaugeRepository.Update(seekerLanguageToUpdate);
        }
Exemple #2
0
 public void Create(JobSeekerLanguagesViewModel jobSeekerLanguagesViewModel)
 {
     jobSeekerLangaugeRepository.Insert(new JobSeekerLanguages {
         Id              = Guid.NewGuid().ToString(),
         LanguageId      = jobSeekerLanguagesViewModel.LanguageId,
         LanguageLevelId = jobSeekerLanguagesViewModel.LanguageLevelId,
         JobSeekerId     = jobSeekerLanguagesViewModel.JobSeekerId,
         IsActive        = true
     });
 }
Exemple #3
0
        public JsonResult UpdateLanguage(JobSeekerLanguagesViewModel jobSeekerLanguagesViewModel)
        {
            var response = new HustlersResponse <JobSeekerLanguagesViewModel>();

            jobSeekerLanguagesViewModel.JobSeekerId = HttpContext.Session.Get <string>("JobSeekerId");
            //Check Validations
            languageService.Edit(jobSeekerLanguagesViewModel);
            response.Messages = "Language Updated Successfully";
            response.Status   = "ok";
            return(Json(response));
        }
Exemple #4
0
        public JsonResult Create(JobSeekerLanguagesViewModel jobSeekerLanguagesViewModel)
        {
            var response = new HustlersResponse <JobSeekerLanguagesViewModel>();

            jobSeekerLanguagesViewModel.JobSeekerId = HttpContext.Session.Get <string>("JobSeekerId");
            //Check if language already exists
            if (jobSeekerService.IsJobSeekerLanguageExisting(jobSeekerLanguagesViewModel.LanguageId, jobSeekerLanguagesViewModel.JobSeekerId))
            {
                return(Json(new Dictionary <string, string> {
                    { "message", "Language already exist" }
                }));
            }
            //Create JobSeekerSkills
            languageService.Create(jobSeekerLanguagesViewModel);
            return(Json(new Dictionary <string, string> {
                { "message", "Language Successfully Created" }
            }));
        }