Пример #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            notifications_temp notifications_temp = await db.notifications_temp.FindAsync(id);

            db.notifications_temp.Remove(notifications_temp);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Пример #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,content_text,func")] notifications_temp notifications_temp)
        {
            if (ModelState.IsValid)
            {
                db.Entry(notifications_temp).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(notifications_temp));
        }
Пример #3
0
        public async Task <ActionResult> Create([Bind(Include = "Id,content_text,func")] notifications_temp notifications_temp)
        {
            if (ModelState.IsValid)
            {
                db.notifications_temp.Add(notifications_temp);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(notifications_temp));
        }
Пример #4
0
        // GET: notifications_temp/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            notifications_temp notifications_temp = await db.notifications_temp.FindAsync(id);

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