Пример #1
0
        public KawruhBasa Find(int id)
        {
            KawruhBasa result = (from b in kawruhBasaa
                                 where b.KawruhBasaId == id
                                 select b).FirstOrDefault <KawruhBasa>();

            return(result);
        }
Пример #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            KawruhBasa kawruhbasa = db.KawruhBasa.Find(id);

            db.KawruhBasa.Remove(kawruhbasa);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #3
0
 public ActionResult Edit([Bind(Include = "KawruhBasaId,Tembung,PodhoTegese,KosokBalen,KategoriId")] KawruhBasa kawruhbasa)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kawruhbasa).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.KategoriId = new SelectList(db.Kategori, "KategoriId", "Jenis", kawruhbasa.KategoriId);
     return(View(kawruhbasa));
 }
Пример #4
0
        // GET: /KawruhBasa/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            KawruhBasa kawruhbasa = db.KawruhBasa.Find(id);

            if (kawruhbasa == null)
            {
                return(HttpNotFound());
            }
            return(View(kawruhbasa));
        }
Пример #5
0
        // GET: /KawruhBasa/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            KawruhBasa kawruhbasa = db.KawruhBasa.Find(id);

            if (kawruhbasa == null)
            {
                return(HttpNotFound());
            }
            ViewBag.KategoriId = new SelectList(db.Kategori, "KategoriId", "Jenis", kawruhbasa.KategoriId);
            return(View(kawruhbasa));
        }