예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Falkuta falkuta = db.Falkutas.Find(id);

            db.Falkutas.Remove(falkuta);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "FalkutasID,Id_falkutas,Nama_falkutas")] Falkuta falkuta)
 {
     if (ModelState.IsValid)
     {
         db.Entry(falkuta).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(falkuta));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "FalkutasID,Id_falkutas,Nama_falkutas")] Falkuta falkuta)
        {
            if (ModelState.IsValid)
            {
                db.Falkutas.Add(falkuta);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(falkuta));
        }
예제 #4
0
        // GET: Falkutas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Falkuta falkuta = db.Falkutas.Find(id);

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