예제 #1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Photo,Address,DOB,Designation_Id,Pan,Aadhar,Phno,Fingerprint,Dept_Id,Qualification,Pub_No,Prev_Exp,Events,Project_Id")] Teacher teacher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teacher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(teacher));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "LeaveID,ID,LeaveDescription,TempContact,StartDate,EndDate,LeaveType,LeaveTypeCount,TotalLeaveCount")] Leave leave)
 {
     if (ModelState.IsValid)
     {
         db.Entry(leave).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID = new SelectList(db.Teachers, "Id", "Name", leave.ID);
     return(View(leave));
 }