Esempio n. 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            RegionsText regionsText = await db.RegionsTexts.FindAsync(id);

            db.RegionsTexts.Remove(regionsText);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,RegionId,Language,Name")] RegionsText regionsText)
        {
            if (ModelState.IsValid)
            {
                db.Entry(regionsText).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.RegionId = new SelectList(db.tblRegions, "RegionId", "Name", regionsText.RegionId);
            ViewBag.Language = new SelectList(db.Languages, "ISO", "Label", regionsText.Language);
            return(View(regionsText));
        }
Esempio n. 3
0
        // GET: RegionsTexts/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RegionsText regionsText = await db.RegionsTexts.FindAsync(id);

            if (regionsText == null)
            {
                return(HttpNotFound());
            }
            return(View(regionsText));
        }
Esempio n. 4
0
        // GET: RegionsTexts/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RegionsText regionsText = await db.RegionsTexts.FindAsync(id);

            if (regionsText == null)
            {
                return(HttpNotFound());
            }
            ViewBag.RegionId = new SelectList(db.tblRegions, "RegionId", "Name", regionsText.RegionId);
            ViewBag.Language = new SelectList(db.Languages, "ISO", "Label", regionsText.Language);
            return(View(regionsText));
        }