public ActionResult Edit([Bind(Include = "ProjectId,ProjectName,StartDate,FinishDate")] Project project) { if (ModelState.IsValid) { db.Entry(project).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(project)); }
public ActionResult Edit([Bind(Include = "PropjectJoinId,EmployeeId,ProjectId,StarDate,FinishDate")] ProjectJoin projectJoin) { if (ModelState.IsValid) { db.Entry(projectJoin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployeeId = new SelectList(db.Employee, "EmployeeId", "FullName", projectJoin.EmployeeId); ViewBag.ProjectId = new SelectList(db.Project, "ProjectId", "ProjectName", projectJoin.ProjectId); return(View(projectJoin)); }