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

            db.clubEvents.Remove(clubEvents);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Description,PointKey,PointValue,EventCount,ClubId,Date")] ClubEvents clubEvents)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clubEvents).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ClubId = new SelectList(db.clubs, "Id", "Name", clubEvents.ClubId);
     return(View(clubEvents));
 }
Esempio n. 3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClubEvents clubEvents = db.clubEvents.Find(id);

            if (clubEvents == null)
            {
                return(HttpNotFound());
            }
            return(View(clubEvents));
        }
Esempio n. 4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClubEvents clubEvents = db.clubEvents.Find(id);

            if (clubEvents == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ClubId = new SelectList(db.clubs, "Id", "Name", clubEvents.ClubId);
            return(View(clubEvents));
        }