Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "DesignationId,DesignationName")] Designation designation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(designation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(designation));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "SemesterId,SemesterName")] Semester semester)
 {
     if (ModelState.IsValid)
     {
         db.Entry(semester).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(semester));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "UserId,UserName,Password,UserRole")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
 public ActionResult Edit([Bind(Include = "ShiftId,ShiftName")] Shift shift)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shift).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(shift));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "TeacherId,TeacherName,DesignationID,PhoneNo,Address")] Teacher teacher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teacher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DesignationID = new SelectList(db.Designations, "DesignationId", "DesignationName", teacher.DesignationID);
     return(View(teacher));
 }
Exemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "Id,StudentId,SubjectCode,Marks,ExamName,SemesterId,Session,DepartmentId,AddedDate,AddedBy")] ExamMark examMark)
 {
     if (ModelState.IsValid)
     {
         db.Entry(examMark).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DepartmentId = new SelectList(db.Departments, "DepartmentId", "DepartmentName", examMark.DepartmentId);
     ViewBag.AddedBy      = new SelectList(db.Users, "UserId", "UserName", examMark.AddedBy);
     ViewBag.SemesterId   = new SelectList(db.Semesters, "SemesterId", "SemesterName", examMark.SemesterId);
     ViewBag.StudentId    = new SelectList(db.Students, "StudentId", "StudentName", examMark.StudentId);
     return(View(examMark));
 }
 public ActionResult Edit([Bind(Include = "StudentId,StudentName,Gender,Address,Phone,Session,DepartmentId,SemesterId,ShiftId,RegNo,AddedDate,AddedBy")] Student student)
 {
     if (ModelState.IsValid)
     {
         db.Entry(student).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DepartmentId = new SelectList(db.Departments, "DepartmentId", "DepartmentName", student.DepartmentId);
     ViewBag.SemesterId   = new SelectList(db.Semesters, "SemesterId", "SemesterName", student.SemesterId);
     ViewBag.ShiftId      = new SelectList(db.Shifts, "ShiftId", "ShiftName", student.ShiftId);
     ViewBag.AddedBy      = new SelectList(db.Users, "UserId", "UserName", student.AddedBy);
     return(View(student));
 }