public ActionResult Edit([Bind(Include = "DepartmentId,DepartmentName")] Department department) { if (ModelState.IsValid) { db.Entry(department).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(department)); }
public ActionResult Edit([Bind(Include = "Id,DepID,customerName,password,tel,email")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DepID = new SelectList(db.Departments, "DepartmentId", "DepartmentName", user.DepID); return(View(user)); }
public ActionResult Edit(User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DepID = new SelectList(db.Departments, "DepartmentId", "DepartmentName", user.DepID); return(View(user)); }
public ActionResult Edit([Bind(Include = "Id,Name,Pid,PValue,Url")] Permissions permissions) { if (ModelState.IsValid) { db.Entry(permissions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Pid = new SelectList(db.Permissionss, "Id", "Name", permissions.Pid); return(View(permissions)); }