Esempio n. 1
0
 public ActionResult DeleteConfirmed(long id)
 {
     NotificationAlert.Notification notification = _context.Notifications.Find(id);
     _context.Notifications.Remove(notification);
     _context.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 2
0
 public ActionResult Change([Bind(Include = "NotificationId,Title,NotificationType,Controller,Action,UserId,IsDismissed")] NotificationAlert.Notification notification)
 {
     if (ModelState.IsValid)
     {
         _context.Entry(notification).State = EntityState.Modified;
         _context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(notification));
 }
Esempio n. 3
0
        // GET: Notifications/Delete/5

        public ActionResult Remove(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NotificationAlert.Notification notification = _context.Notifications.Find(id.Value);
            if (notification == null)
            {
                return(HttpNotFound());
            }
            return(View(notification));
        }