[HttpPost] [ValidateAntiForgeryToken] public ActionResult SuggestedProjectApproval([Bind(Include = "RECID,PROJECTNO,PROJECTDESC,PROJECTTEAMLEADERID,PROJECTYEAR,PROJECTINITIALAPPROVALSTATUS,PROJECTINITIALAPPROVALNOTES")] STUDY_PROJECTS studyProject, string Approve, string Refuse) { if (ModelState.IsValid) { db.Entry(studyProject).State = EntityState.Modified; if (!string.IsNullOrEmpty(Approve)) { studyProject.PROJECTINITIALAPPROVALSTATUS = 1; } else if (!string.IsNullOrEmpty(Refuse)) { studyProject.PROJECTINITIALAPPROVALSTATUS = 2; } db.SaveChanges(); return RedirectToAction("Index"); } return View(studyProject); }
db.Entry(studyProject).Property(e => e.SomeProperty).IsModified = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)