public async Task <ActionResult> Edit([Bind(Include = "FamilyInfoId,CriminalRecord,Residence,Work,Photo")] FamilyInfo familyInfo) { if (ModelState.IsValid) { db.Entry(familyInfo).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(familyInfo)); }
public async Task <ActionResult> Edit([Bind(Include = "ProgramStatusId,StatusName")] ProgramStatus programStatus) { if (ModelState.IsValid) { db.Entry(programStatus).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(programStatus)); }
public async Task <ActionResult> Edit([Bind(Include = "CountryId,Name")] Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(country)); }
public async Task <ActionResult> Edit([Bind(Include = "StudyCenterId,Name,CountryId")] StudyCenter studyCenter) { if (ModelState.IsValid) { db.Entry(studyCenter).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.CountryId = new SelectList(db.Country, "CountryId", "Name", studyCenter.CountryId); return(View(studyCenter)); }
public async Task <ActionResult> Edit([Bind(Include = "NoteId,CourseId,Score")] Note note) { if (ModelState.IsValid) { db.Entry(note).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.CourseId = new SelectList(db.Course, "CourseId", "Name", note.CourseId); return(View(note)); }
public async Task <ActionResult> Edit([Bind(Include = "CourseId,Name,ProgramId")] Course course) { if (ModelState.IsValid) { db.Entry(course).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.ProgramId = new SelectList(db.Program, "ProgramId", "Name", course.ProgramId); return(View(course)); }
public async Task <ActionResult> Edit([Bind(Include = "StudentApplicationId,ApplicationStatusId,StudentName,ProgramId")] StudentApplication studentApplication) { if (ModelState.IsValid) { db.Entry(studentApplication).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.ApplicationStatusId = new SelectList(db.ApplicationStatus, "ApplicationStatusId", "StatusName", studentApplication.ApplicationStatusId); ViewBag.ProgramId = new SelectList(db.Program, "ProgramId", "Name", studentApplication.ProgramId); return(View(studentApplication)); }
public async Task <ActionResult> Edit([Bind(Include = "ProgramId,Name,Description,Spaces,PeriodId,ProgramStatusId,StudyCenterId")] Program program) { if (ModelState.IsValid) { db.Entry(program).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.PeriodId = new SelectList(db.Period, "PeriodId", "Name", program.PeriodId); ViewBag.ProgramStatusId = new SelectList(db.ProgramStatus, "ProgramStatusId", "StatusName", program.ProgramStatusId); ViewBag.StudyCenterId = new SelectList(db.StudyCenter, "StudyCenterId", "Name", program.StudyCenterId); return(View(program)); }