public ActionResult Edit([Bind(Include = "id,FirstNameCM,LastNameCM")] CaseManager caseManager) { if (ModelState.IsValid) { db.Entry(caseManager).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(caseManager)); }
public ActionResult Edit([Bind(Include = "id,AlternateOffering,StudentIndication,Alias,ChineseNatOrRez,AssessedLocation,OnshoreOffshore")] Student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(student)); }
public ActionResult Edit([Bind(Include = "id,FirstNameTA,LastNameTA")] TeachingAssistant teachingAssistant) { if (ModelState.IsValid) { db.Entry(teachingAssistant).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(teachingAssistant)); }
public ActionResult Edit([Bind(Include = "id,CourseTitle,CourseAttendType,Alias")] Student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(student)); }
public ActionResult Edit([Bind(Include = "id,UnitCode,UnitVer,UnitTitle,UnitClass")] Unit unit) { if (ModelState.IsValid) { db.Entry(unit).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(unit)); }
public ActionResult Edit([Bind(Include = "id,UnitCode,Deliverable,UnitTeachingLeadPrimary,UnitOwningOrgPrimary,UnitLevel,UnitLocation,UnitMode,Eftsl,UnitOfferingYear,UnitOfferingSem,Student_id,TeachingAssistant_id")] Unit unit) { if (ModelState.IsValid) { db.Entry(unit).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Student_id = new SelectList(db.Students, "id", "AlternateOffering", unit.Student_id); ViewBag.TeachingAssistant_id = new SelectList(db.TeachingAssistants, "id", "FirstNameTA", unit.TeachingAssistant_id); return(View(unit)); }
public ActionResult Edit([Bind(Include = "id,TAUnit_id,teachingAssistant_id")] Engagement engagement) { if (ModelState.IsValid) { db.Entry(engagement).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.teachingAssistant_id = new SelectList(db.TeachingAssistants, "id", "FirstNameTA", engagement.teachingAssistant_id); ViewBag.TAUnit_id = new SelectList(db.Units, "id", "UnitCode", engagement.TAUnit_id); return(View(engagement)); }
public ActionResult Edit([Bind(Include = "id,UnitAttemptStat,student_id,StuUnit_id")] Enrolment enrolment) { if (ModelState.IsValid) { db.Entry(enrolment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.student_id = new SelectList(db.Students, "id", "CourseTitle", enrolment.student_id); ViewBag.StuUnit_id = new SelectList(db.Units, "id", "UnitCode", enrolment.StuUnit_id); return(View(enrolment)); }
public ActionResult Edit([Bind(Include = "id,CaseId,CaseManager_id,Student_id,TeachingAssistant_id,Unit_id")] Case @case) { if (ModelState.IsValid) { db.Entry(@case).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CaseManager_id = new SelectList(db.CaseManagers, "id", "FullNameCM", @case.CaseManager.FullNameCM); ViewBag.Student_id = new SelectList(db.Students, "id", "id", @case.Student.Alias); ViewBag.TeachingAssistant_id = new SelectList(db.TeachingAssistants, "id", "FullNameTA", @case.TeachingAssistant.FullNameTA); ViewBag.Unit_id = new SelectList(db.Units, "id", "UnitCode", @case.Unit.UnitCode); return(View(@case)); }
public ActionResult Edit([Bind(Include = "id,CreatedDate,CommentText,Action,ClosedDate,AssignedCM_id,CurrentCase_id")] Comment comment) { if (comment.Action.Equals("Closed")) { comment.ClosedDate = DateTime.Now; } if (ModelState.IsValid) { db.Entry(comment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CurrentCase_id = new SelectList(db.Cases, "id", "id", comment.CurrentCase_id); ViewBag.AssignedCM_id = new SelectList(db.CaseManagers, "id", "FullNameCM", comment.AssignedCM_id); return(View(comment)); }