Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MembershipOption2 membershipOption2 = db.MembershipOptions.Find(id);

            db.MembershipOptions.Remove(membershipOption2);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,ClubId,Option,OtherName,Expiration,Price,Description,IsActive")] MembershipOption2 membershipOption2)
 {
     if (ModelState.IsValid)
     {
         db.Entry(membershipOption2).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(membershipOption2));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,ClubId,Option,OtherName,Expiration,Price,Description,IsActive")] MembershipOption2 membershipOption2)
        {
            if (ModelState.IsValid)
            {
                db.MembershipOptions.Add(membershipOption2);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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