public ActionResult DeleteConfirmed(int id)
        {
            AspNetPushNotification aspNetPushNotification = db.AspNetPushNotifications.Find(id);

            db.AspNetPushNotifications.Remove(aspNetPushNotification);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Message,UserID,Time,IsOpen")] AspNetPushNotification aspNetPushNotification)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetPushNotification).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserID = new SelectList(db.AspNetUsers, "Id", "Name", aspNetPushNotification.UserID);
     return(View(aspNetPushNotification));
 }
        public ActionResult Create([Bind(Include = "Id,Message,UserID,Time,IsOpenStudent,IsOpenParent")] AspNetPushNotification aspNetPushNotification)
        {
            if (ModelState.IsValid)
            {
                db.AspNetPushNotifications.Add(aspNetPushNotification);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.UserID = new SelectList(db.AspNetUsers, "Id", "Name", aspNetPushNotification.UserID);
            return(View(aspNetPushNotification));
        }
        // GET: AspNetPushNotifications/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetPushNotification aspNetPushNotification = db.AspNetPushNotifications.Find(id);

            if (aspNetPushNotification == null)
            {
                return(HttpNotFound());
            }
            return(View(aspNetPushNotification));
        }
        // GET: AspNetPushNotifications/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetPushNotification aspNetPushNotification = db.AspNetPushNotifications.Find(id);

            if (aspNetPushNotification == null)
            {
                return(HttpNotFound());
            }
            ViewBag.UserID = new SelectList(db.AspNetUsers, "Id", "Name", aspNetPushNotification.UserID);
            return(View(aspNetPushNotification));
        }