Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            All_User allUser = db.All_User.Find(id);

            db.All_User.Remove(allUser);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        //
        // GET: /Home/Delete/5

        public ActionResult Delete(int id = 0)
        {
            All_User allUser = db.All_User.Find(id);

            if (allUser == null)
            {
                return(HttpNotFound());
            }
            return(View(allUser));
        }
Esempio n. 3
0
 public ActionResult Edit(All_User allUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(allUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(allUser));
 }
Esempio n. 4
0
        public ActionResult Create(All_User allUser)
        {
            if (ModelState.IsValid)
            {
                db.All_User.Add(allUser);
                allUser.AddedDate = DateTime.Now;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(allUser));
        }