示例#1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            MenuPageWeb menuPageWeb = await db.MenuPageWebs.FindAsync(id);

            db.MenuPageWebs.Remove(menuPageWeb);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
示例#2
0
        public async Task <ActionResult> Edit([Bind(Include = "PageId,SubMenuHeadID,MenuHeadID,PageName,URL,CreateDate,LastUpdateDate,IsRemoved,PageTitle,LiID")] MenuPageWeb menuPageWeb)
        {
            if (ModelState.IsValid)
            {
                db.Entry(menuPageWeb).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(menuPageWeb));
        }
示例#3
0
        // GET: MenuPageWebs/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MenuPageWeb menuPageWeb = await db.MenuPageWebs.FindAsync(id);

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