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

            db.Zyuusyorokus.Remove(zyuusyoroku);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,ZyuusyorokuId,MeisyouRyaku,MeisyouSei,Zyuusyo1,Zyuusyo2,Zyuusyo3,Zyuusyo4,DennwaBanngou,FaxBanngou,EriaId")] Zyuusyoroku zyuusyoroku)
        {
            if (ModelState.IsValid)
            {
                db.Entry(zyuusyoroku).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(zyuusyoroku));
        }
コード例 #3
0
        // GET: Zyuusyorokus/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Zyuusyoroku zyuusyoroku = await db.Zyuusyorokus.FindAsync(id);

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