public ActionResult Edit([Bind(Include = "StudentId,Username,FName,LName,Address,DOB,City,Password,MobileNo")] Student_174852 student_174852) { if (Session["TeacherId"] != null) { if (ModelState.IsValid) { db.Entry(student_174852).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.StudentId = new SelectList(db.Planning_174852, "StudentId", "Monday", student_174852.StudentId); return(View(student_174852)); } else { return(RedirectToAction("Login", "Admin")); } }
public ActionResult Edit([Bind(Include = "TeacherId,Username,FirstName,LastName,Address,DOB,City,Password,MobileNumber,IsAdmin")] Teachers_174852 teachers_174852) { if (ModelState.IsValid) { db.Entry(teachers_174852).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(teachers_174852)); }
public ActionResult Edit([Bind(Include = "TeacherId,CourseId")] Teaches_174852 teaches_174852) { if (ModelState.IsValid) { db.Entry(teaches_174852).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CourseId = new SelectList(db.Courses_174852, "CourseId", "CourseName", teaches_174852.CourseId); return(View(teaches_174852)); }
public ActionResult Edit([Bind(Include = "CourseId,StudentId")] Enrollment_174852 enrollment_174852) { if (ModelState.IsValid) { db.Entry(enrollment_174852).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CourseId = new SelectList(db.Courses_174852, "CourseId", "CourseName", enrollment_174852.CourseId); ViewBag.StudentId = new SelectList(db.Student_174852, "StudentId", "Username", enrollment_174852.StudentId); return(View(enrollment_174852)); }
public ActionResult Edit([Bind(Include = "HomeWorkId,Description,Deadline,ReqTime,LongDescription")] Homework_174852 homework_174852) { TempData["ForAlert"] = false; if (ModelState.IsValid) { db.Entry(homework_174852).State = EntityState.Modified; db.SaveChanges(); TempData["ForAlert"] = true; return(RedirectToAction("Index", "Admin")); } ViewBag.HomeWorkId = new SelectList(db.Assignments_174852, "HomeWorkId", "HomeWorkId", homework_174852.HomeWorkId); return(View(homework_174852)); }