Example #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            Syuukasaki syuukasaki = await db.Syuukasakis.FindAsync(id);

            db.Syuukasakis.Remove(syuukasaki);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Example #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,UserId,ZyuusyorokuId,EriaId")] Syuukasaki syuukasaki)
        {
            if (ModelState.IsValid)
            {
                db.Entry(syuukasaki).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(syuukasaki));
        }
Example #3
0
        public async Task <ActionResult> Create([Bind(Include = "Id,UserId,ZyuusyorokuId,EriaId")] Syuukasaki syuukasaki)
        {
            if (ModelState.IsValid)
            {
                db.Syuukasakis.Add(syuukasaki);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(syuukasaki));
        }
Example #4
0
        // GET: Syuukasakis/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Syuukasaki syuukasaki = await db.Syuukasakis.FindAsync(id);

            if (syuukasaki == null)
            {
                return(HttpNotFound());
            }
            return(View(syuukasaki));
        }