Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Volunteer_Work_Type volunteer_Work_Type = db.Volunteer_Work_Type.Find(id);

            db.Volunteer_Work_Type.Remove(volunteer_Work_Type);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Vol_WorkType_ID,Vol_WorkType_Name,Vol_WorkType_Description")] Volunteer_Work_Type volunteer_Work_Type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(volunteer_Work_Type).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(volunteer_Work_Type));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Vol_WorkType_ID,Vol_WorkType_Name,Vol_WorkType_Description")] Volunteer_Work_Type volunteer_Work_Type)
        {
            if (ModelState.IsValid)
            {
                db.Volunteer_Work_Type.Add(volunteer_Work_Type);
                db.SaveChanges();

                return(RedirectToAction("Index"));
            }

            return(View(volunteer_Work_Type));
        }
Esempio n. 4
0
        // GET: Volunteer_Work_Type/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Volunteer_Work_Type volunteer_Work_Type = db.Volunteer_Work_Type.Find(id);

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