public ActionResult AddExperience(PI_Neoxam_GRH.Domain.Enities.experience experience) { PI_Neoxam_GRH.Domain.Enities.experience experienceDomain = new PI_Neoxam_GRH.Domain.Enities.experience() { addressLine1 = experience.addressLine1, addressLine2 = experience.addressLine2, city = experience.city, Company_Name = experience.Company_Name, country = experience.country, cv1_id = experience.cv1_id, Department = experience.Department, Duration = experience.Duration, End_Date = experience.End_Date, Role = experience.Role, Sector = experience.Sector, Start_Date = experience.Start_Date, state = experience.state, Subject = experience.Subject, zipCode = experience.zipCode }; experienceService.Add(experienceDomain); experienceService.Commit(); return(RedirectToAction("AddProfileInformations")); }
public ActionResult DeleteExperience(int id, int ExperienceId) { Candidate c = candidateService.GetById(id); for (int i = 0; i < c.Experiences.Count; i++) { if (c.Experiences.ElementAt(i).ExperienceId == ExperienceId) { c.Experiences.Remove(c.Experiences.ElementAt(i)); break; } } candidateService.Update(c); candidateService.Commit(); Experience e = experienceService.GetById(ExperienceId); experienceService.Delete(e); experienceService.Commit(); return(RedirectToAction("Details", new { id })); }