Esempio n. 1
0
        public ActionResult DeleteConfirmed(long id)
        {
            MasterKelompok masterKelompok = db.MasterKelompok.Find(id);

            db.MasterKelompok.Remove(masterKelompok);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Nama")] MasterKelompok masterKelompok)
 {
     if (ModelState.IsValid)
     {
         db.Entry(masterKelompok).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(masterKelompok));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Nama")] MasterKelompok masterKelompok)
        {
            if (ModelState.IsValid)
            {
                db.MasterKelompok.Add(masterKelompok);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(masterKelompok));
        }
Esempio n. 4
0
        // GET: MasterKelompoks/Edit/5
        public ActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MasterKelompok masterKelompok = db.MasterKelompok.Find(id);

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