Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Paramasastra paramasastra = db.Paramasastras.Find(id);

            db.Paramasastras.Remove(paramasastra);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ParamasastraId,Ngoko,Madya,Inggil,Indonesia,KategoriId")] Paramasastra paramasastra)
 {
     if (ModelState.IsValid)
     {
         db.Entry(paramasastra).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.KategoriId = new SelectList(db.Kategoris, "KategoriId", "Jenis", paramasastra.KategoriId);
     return(View(paramasastra));
 }
Exemplo n.º 3
0
        // GET: /Paramasastra/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Paramasastra paramasastra = db.Paramasastras.Find(id);

            if (paramasastra == null)
            {
                return(HttpNotFound());
            }
            return(View(paramasastra));
        }
Exemplo n.º 4
0
        // GET: /Paramasastra/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Paramasastra paramasastra = db.Paramasastras.Find(id);

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