public ActionResult DeleteConfirmed(int id) { MARINE_CLASS mARINE_CLASS = db.MARINE_CLASS.Find(id); db.MARINE_CLASS.Remove(mARINE_CLASS); db.SaveChanges(); return(RedirectToAction("Index")); }
public async Task <ActionResult> DeleteConfirmed(int id) { MARINE_CLASS mARINE_CLASS = await db.MARINE_CLASS.FindAsync(id); db.MARINE_CLASS.Remove(mARINE_CLASS); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_PK,TEXT,SCHEDULE4")] MARINE_CLASS mARINE_CLASS) { if (ModelState.IsValid) { db.Entry(mARINE_CLASS).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mARINE_CLASS)); }
public ActionResult Create([Bind(Include = "ID_PK,TEXT,SCHEDULE4")] MARINE_CLASS mARINE_CLASS) { if (ModelState.IsValid) { db.MARINE_CLASS.Add(mARINE_CLASS); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mARINE_CLASS)); }
public async Task <ActionResult> Edit([Bind(Include = "ID_PK,TEXT,SCHEDULE4,FLAG")] MARINE_CLASS mARINE_CLASS) { if (ModelState.IsValid) { db.Entry(mARINE_CLASS).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(mARINE_CLASS)); }
public async Task <ActionResult> Create([Bind(Include = "ID_PK,TEXT,SCHEDULE4,FLAG")] MARINE_CLASS mARINE_CLASS) { if (ModelState.IsValid) { db.MARINE_CLASS.Add(mARINE_CLASS); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(mARINE_CLASS)); }
// GET: MARINE_CLASS/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MARINE_CLASS mARINE_CLASS = db.MARINE_CLASS.Find(id); if (mARINE_CLASS == null) { return(HttpNotFound()); } return(View(mARINE_CLASS)); }
// GET: MARINE_CLASS/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MARINE_CLASS mARINE_CLASS = await db.MARINE_CLASS.FindAsync(id); if (mARINE_CLASS == null) { return(HttpNotFound()); } return(View(mARINE_CLASS)); }