Exemple #1
0
        public ActionResult DeleteConfirmed(short id)
        {
            EventDetailStatu eventDetailStatu = db.EventDetailStatus.Find(id);

            db.EventDetailStatus.Remove(eventDetailStatu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "EventDetailStatusID,EvenDetailStatusName")] EventDetailStatu eventDetailStatu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eventDetailStatu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(eventDetailStatu));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "EventDetailStatusID,EvenDetailStatusName")] EventDetailStatu eventDetailStatu)
        {
            if (ModelState.IsValid)
            {
                db.EventDetailStatus.Add(eventDetailStatu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(eventDetailStatu));
        }
Exemple #4
0
        // GET: EventDetailStatus/Delete/5
        public ActionResult Delete(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EventDetailStatu eventDetailStatu = db.EventDetailStatus.Find(id);

            if (eventDetailStatu == null)
            {
                return(HttpNotFound());
            }
            return(View(eventDetailStatu));
        }
Exemple #5
0
        // GET: EventDetailStatus/Edit/5
        public ActionResult Edit(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EventDetailStatu @event = db.EventDetailStatus.Find(id);

            if (@event == null)
            {
                return(HttpNotFound());
            }
            return(View(@event));
        }
Exemple #6
0
 public ActionResult DeleteEvent(int[] EventIDs)
 {
     try
     {
         using (HollywoodTestEntities1 entities = new HollywoodTestEntities1())
         {
             foreach (int EventId in EventIDs)
             {
                 EventDetailStatu events = (from Ev in entities.EventDetailStatus where Ev.EventDetailStatusID == EventId select Ev).FirstOrDefault();
                 entities.EventDetailStatus.Remove(events);
             }
             entities.SaveChanges();
         }
         return(new EmptyResult());
     }
     catch
     {
         return(View());
     }
 }