public async Task <IActionResult> PutEducationalInformation(int id, EducationalInformation educationalInformation) { if (id != educationalInformation.ID) { return(BadRequest()); } _context.Entry(educationalInformation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EducationalInformationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult EducationalDetails(String latest_qualification, String degree_title, String institute, String year_of_completion, String majors) { AlumniUsersAuthenticate alumniUsersAuthenticate = Session["user"] as AlumniUsersAuthenticate; EducationalInformation educationalInformation = new EducationalInformation(); educationalInformation.latest_qualification = latest_qualification; educationalInformation.degree_title = degree_title; educationalInformation.institute = institute; educationalInformation.year_of_completion = year_of_completion; educationalInformation.majors = majors; educationalInformation.alumni_id = alumniUsersAuthenticate.alumni_id; db.EducationalInformations.Add(educationalInformation); db.SaveChanges(); if (alumniUsersAuthenticate.alumni_survey_status.Equals("Not Filled")) { return(RedirectToAction("alumniSurvey")); } else { return(RedirectToAction("login")); } }
public async Task <ActionResult <EducationalInformation> > PostEducationalInformation(EducationalInformation educationalInformation) { _context.EducationalInformation.Add(educationalInformation); await _context.SaveChangesAsync(); return(CreatedAtAction("GetEducationalInformation", new { id = educationalInformation.ID }, educationalInformation)); }