コード例 #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            YESIL yESIL = await db.Yesiller.FindAsync(id);

            db.Yesiller.Remove(yESIL);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,GID,SOZCUK,CUMLE1,CUMLE2,CUMLE3,OTAR,GTAR")] YESIL yESIL)
        {
            if (ModelState.IsValid)
            {
                db.Entry(yESIL).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.GID = new SelectList(db.Kelimeler, "ID", "SARI", yESIL.GID);
            return(View(yESIL));
        }
コード例 #3
0
        // GET: YESIL/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            YESIL yESIL = await db.Yesiller.FindAsync(id);

            if (yESIL == null)
            {
                return(HttpNotFound());
            }
            return(View(yESIL));
        }
コード例 #4
0
        // GET: YESIL/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            YESIL yESIL = await db.Yesiller.FindAsync(id);

            if (yESIL == null)
            {
                return(HttpNotFound());
            }
            ViewBag.GID = new SelectList(db.Kelimeler, "ID", "SARI", yESIL.GID);
            return(View(yESIL));
        }