Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Date,StartTime,EndTime,OrganizationId")] Event @event)
 {
     if (ModelState.IsValid)
     {
         db.Entry(@event).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(@event));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Phone,Website,Cause")] Organization organization)
 {
     if (ModelState.IsValid)
     {
         db.Entry(organization).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(organization));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,Name,Phone,Email")] Volunteer volunteer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(volunteer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(volunteer));
 }