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