public ActionResult Edit([Bind(Exclude = "ID,User_ID")] Post post) { if (ModelState.IsValid) { db.Entry(post).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", "Home")); } return(View()); }
public ActionResult SetStatus(Project project) { if (ModelState.IsValid) { db.Entry(project).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.POST_ID = new SelectList(db.Posts, "ID", "post_Description", project.POST_ID); ViewBag.Project_Manager_ID = new SelectList(db.Users, "ID", "User_Name", project.Project_Manager_ID); return(View(project)); }