Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 5
0
        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));
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
        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));
        }
Ejemplo n.º 8
0
        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));
        }