Exemple #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            AccreditationsText accreditationsText = await db.AccreditationsTexts.FindAsync(id);

            db.AccreditationsTexts.Remove(accreditationsText);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        // 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));
        }
Exemple #4
0
        // 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));
        }