示例#1
0
        public ActionResult DeleteConfirmed(string id)
        {
            DosenPembimbing dosenPembimbing = db.DosenPembimbings.Find(id);

            db.DosenPembimbings.Remove(dosenPembimbing);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Username,NIDN,IdKel,Nama")] DosenPembimbing dosenPembimbing)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dosenPembimbing).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Username = new SelectList(db.Akuns, "Username", "Email", dosenPembimbing.Username);
     ViewBag.IdKel    = new SelectList(db.KelompokKkns, "IdKel", "KodeDesa", dosenPembimbing.IdKel);
     return(View(dosenPembimbing));
 }
示例#3
0
        // GET: Pembina/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DosenPembimbing dosenPembimbing = db.DosenPembimbings.Find(id);

            if (dosenPembimbing == null)
            {
                return(HttpNotFound());
            }
            return(View(dosenPembimbing));
        }
示例#4
0
        // GET: Pembina/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DosenPembimbing dosenPembimbing = db.DosenPembimbings.Find(id);

            if (dosenPembimbing == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Username = new SelectList(db.Akuns, "Username", "Email", dosenPembimbing.Username);
            ViewBag.IdKel    = new SelectList(db.KelompokKkns, "IdKel", "KodeDesa", dosenPembimbing.IdKel);
            return(View(dosenPembimbing));
        }