Example #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            managelist managelist = await db.managelists.FindAsync(id);

            db.managelists.Remove(managelist);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Example #2
0
        public async Task <ActionResult> Edit([Bind(Include = "idmanagelist,name,flag")] managelist managelist)
        {
            if (ModelState.IsValid)
            {
                db.Entry(managelist).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(managelist));
        }
Example #3
0
        public async Task <ActionResult> Create([Bind(Include = "idmanagelist,name,flag")] managelist managelist)
        {
            if (ModelState.IsValid)
            {
                db.managelists.Add(managelist);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(managelist));
        }
Example #4
0
        // GET: managelists/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            managelist managelist = await db.managelists.FindAsync(id);

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