コード例 #1
0
        public ActionResult Delete(int id)
        {
            trka trka = db.trkas.Find(id);

            db.trkas.Remove(trka);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "idkas,idanggota,nominal,jeniskas,status,creaby,creadate,modiby,modidate")] trka trka)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trka).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.idanggota = new SelectList(db.msanggotabems, "idanggota", "nama", trka.idanggota);
     return(View(trka));
 }
コード例 #3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            trka trka = db.trkas.Find(id);

            if (trka == null)
            {
                return(HttpNotFound());
            }
            return(View(trka));
        }
コード例 #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            trka trka = db.trkas.Find(id);

            if (trka == null)
            {
                return(HttpNotFound());
            }
            ViewBag.idanggota = new SelectList(db.msanggotabems, "idanggota", "nama", trka.idanggota);
            return(View(trka));
        }