public ActionResult Edit([Bind(Include = "id,programmeName,programmeDate,programmeStatus")] CommiteeProgramme commiteeProgram) { if (ModelState.IsValid) { db.Entry(commiteeProgram).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(commiteeProgram)); }
public ActionResult Edit([Bind(Include = "id,itemName,itemEndDate,itemStartDate,itemOrder,itemStatus,programmeId,createdBy,createDate")] CommiteeItem commiteeItem) { if (ModelState.IsValid) { db.Entry(commiteeItem).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.programmeId = new SelectList(db.CommiteePrograms, "id", "programmeName", commiteeItem.programmeId); return(View(commiteeItem)); }