예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Playment playment = db.Playment.Find(id);

            db.Playment.Remove(playment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "ID_Sposob,Naim_Sposob")] Playment playment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(playment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(playment));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "ID_Sposob,Naim_Sposob")] Playment playment)
        {
            if (ModelState.IsValid)
            {
                db.Playment.Add(playment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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