public IActionResult AddSkill(Skills entity) { ViewBag.resumepages = new SelectList(_resumepageService.GetAll(), "ResumepageId", "ResumepageTitle"); if (ModelState.IsValid) { _skillsService.Create(entity); TempData.Put("message", new ResultMessage() { Title = "Bildirim", Message = "Yetenek Bilgisi başarılı bir şekilde oluşturuldu.", Css = "success" }); return(RedirectToAction("Skills")); } return(View(entity)); }
public JsonResult Create(JobSeekerSkillsViewModel jobSeekerSkillsViewModel) { var response = new HustlersResponse <JobSeekerSkillsViewModel>(); jobSeekerSkillsViewModel.JobSeekerId = HttpContext.Session.Get <string>("JobSeekerId"); //Create JobSeekerSkills if (jobSeekerService.IsJobSeekerSkillExisting(jobSeekerSkillsViewModel.SkillId, jobSeekerSkillsViewModel.JobSeekerId)) { return(Json(new Dictionary <string, string> { { "message", "Skill already exist" } })); } //Check if skill already exists skillsService.Create(jobSeekerSkillsViewModel); return(Json(new Dictionary <string, string> { { "message", "Skill Successfully Created" } })); }