コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SuratMasuk suratMasuk = db.SuratMasuks.Find(id);

            db.SuratMasuks.Remove(suratMasuk);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "SuratMasukId,TglSuratMasuk,JamSuratMasuk,JumlahSurat,JenisSurat,Pengirim,Kepada,PenerimaSecurity,PenerimaKantor,Verifikasi")] SuratMasuk suratMasuk)
 {
     if (ModelState.IsValid)
     {
         db.Entry(suratMasuk).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(suratMasuk));
 }
コード例 #3
0
        // GET: SuratMasuks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SuratMasuk suratMasuk = db.SuratMasuks.Find(id);

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