예제 #1
0
 public ActionResult Edit([Bind(Include = "RegID,RegName,RegDesc")] Region region)
 {
     if (ModelState.IsValid)
     {
         db.Entry(region).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(region));
 }
 public ActionResult Edit([Bind(Include = "EmpID,FirstName,LastName,Email,Pin,FingerPrint,CellNumber,Region,ID_No,EmpType,EmpImage,Present")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmpType = new SelectList(db.EmpTypes, "Em_TypeID", "Name", employee.EmpType);
     return(View(employee));
 }
 public ActionResult Edit([Bind(Include = "EmpTimeID,EmpDate,EmpClockIn,EmpClockOut,EmpID,Present")] EmployeeTime employeeTime)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employeeTime).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmpID = new SelectList(db.Employees, "EmpID", "FirstName", employeeTime.EmpID);
     return(View(employeeTime));
 }