public ActionResult DeleteLanguageFromList(string lt) { LaPerson person = new LaPerson(); person.personalInfo = PIRepository.Responses.Last(); person.languages = LaRepository.Responses.ToList(); LaRepository.DeleteResponce(person.languages.FirstOrDefault(t => t.LanguageTitle == lt)); person.languages = LaRepository.Responses.ToList(); return(View("LanguageLoad", person)); }
public ActionResult LanguageLoad(LaPerson personDTO) { if (ModelState.IsValid) { LaRepository.AddResponse(new Language(personDTO.LanguageTitle, personDTO.Level)); LaPerson person = new LaPerson(); person.personalInfo = PIRepository.Responses.Last(); person.languages = LaRepository.Responses.ToList(); return(View("LanguageLoad", person)); } else { LaPerson person = new LaPerson(PIRepository.Responses.Last(), new List <Language>(), null, null); return(View("LanguageLoad", person)); } }
public ActionResult LanguageAdd() { LaPerson person = new LaPerson(PIRepository.Responses.Last(), new List <Language>(), null, null); return(View("LanguageLoad", person)); }