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

            db.tblUsrLgns.Remove(tblUsrLgn);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "UsrLgnID,UsrLgn,UsrPwrd,UsrAccssLvl")] tblUsrLgn tblUsrLgn)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblUsrLgn).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblUsrLgn));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "UsrLgnID,UsrLgn,UsrPwrd,UsrAccssLvl")] tblUsrLgn tblUsrLgn)
        {
            if (ModelState.IsValid)
            {
                db.tblUsrLgns.Add(tblUsrLgn);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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