예제 #1
0
 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));
 }
예제 #2
0
 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));
 }