public async Task <ActionResult> DeleteConfirmed(int id) { managelist managelist = await db.managelists.FindAsync(id); db.managelists.Remove(managelist); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
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)); }
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)); }
// 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)); }