Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            VolunteerCenter volunteerCenter = db.VolunteerCenter.Find(id);

            db.VolunteerCenter.Remove(volunteerCenter);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "VolunteerCenter_Id,Country,Name,Address,Suburb,Postcode,State,Business_Category,LGA,Region")] VolunteerCenter volunteerCenter)
 {
     if (ModelState.IsValid)
     {
         db.Entry(volunteerCenter).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(volunteerCenter));
 }
Exemplo n.º 3
0
        // GET: VolunteerCenters/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VolunteerCenter volunteerCenter = db.VolunteerCenter.Find(id);

            if (volunteerCenter == null)
            {
                return(HttpNotFound());
            }
            return(View(volunteerCenter));
        }