Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            lj lj = db.lj.Find(id);

            db.lj.Remove(lj);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,lj1")] lj lj)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lj).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lj));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "ID,lj1")] lj lj)
        {
            if (ModelState.IsValid)
            {
                db.lj.Add(lj);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lj));
        }
Example #4
0
        // GET: ljs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            lj lj = db.lj.Find(id);

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