Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Cust_Password cust_Password = db.Cust_Passwords.Find(id);

            db.Cust_Passwords.Remove(cust_Password);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Cust_ID,Password")] Cust_Password cust_Password)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cust_Password).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cust_Password));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Cust_ID,Password")] Cust_Password cust_Password)
        {
            if (ModelState.IsValid)
            {
                db.Cust_Passwords.Add(cust_Password);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cust_Password));
        }
Exemplo n.º 4
0
        // GET: Cust_Password/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Cust_Password cust_Password = db.Cust_Passwords.Find(id);

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