示例#1
0
 public ActionResult Edit([Bind(Include = "faqid,Question,Answer")] FAQ fAQ)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fAQ).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(fAQ));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "UserId,StarRating,ResolutionStartTime,ResolutionEndTime,Date,Id")] Report report)
 {
     if (ModelState.IsValid)
     {
         db.Entry(report).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId = new SelectList(db.Logins, "UserId", "UserName", report.UserId);
     return(View(report));
 }
示例#3
0
 public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,Address,DOB,ManagerId,UserId,Role")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ManagerId = new SelectList(db.Employees, "Id", "FirstName", employee.ManagerId);
     ViewBag.UserId    = new SelectList(db.Logins, "UserId", "UserName", employee.UserId);
     return(View(employee));
 }