public async Task <ActionResult> DeleteConfirmed(int id) { AccreditationsText accreditationsText = await db.AccreditationsTexts.FindAsync(id); db.AccreditationsTexts.Remove(accreditationsText); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,AccreditationId,Language,Label")] AccreditationsText accreditationsText) { if (ModelState.IsValid) { db.Entry(accreditationsText).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.AccreditationId = new SelectList(db.Accreditations, "Id", "Name", accreditationsText.AccreditationId); ViewBag.Language = new SelectList(db.Languages, "ISO", "Label", accreditationsText.Language); return(View(accreditationsText)); }
// GET: AccreditationsTexts/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AccreditationsText accreditationsText = await db.AccreditationsTexts.FindAsync(id); if (accreditationsText == null) { return(HttpNotFound()); } return(View(accreditationsText)); }
// GET: AccreditationsTexts/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AccreditationsText accreditationsText = await db.AccreditationsTexts.FindAsync(id); if (accreditationsText == null) { return(HttpNotFound()); } ViewBag.AccreditationId = new SelectList(db.Accreditations, "Id", "Name", accreditationsText.AccreditationId); ViewBag.Language = new SelectList(db.Languages, "ISO", "Label", accreditationsText.Language); return(View(accreditationsText)); }