Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            User_Admin_Detail user_Admin_Detail = db.User_Admin_Detail.Find(id);

            db.User_Admin_Detail.Remove(user_Admin_Detail);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "userId,admID,admin_fullname,admin_mail,admin_gender,admin_doB,admin_phone")] User_Admin_Detail user_Admin_Detail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user_Admin_Detail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index", "Home"));
     }
     ViewBag.userId = new SelectList(db.AspNetUsers, "Id", "Email", user_Admin_Detail.userId);
     return(View(user_Admin_Detail));
 }
Beispiel #3
0
        // GET: User_Admin_Detail/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            User_Admin_Detail user_Admin_Detail = db.User_Admin_Detail.Find(id);

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

            if (user_Admin_Detail == null)
            {
                return(HttpNotFound());
            }
            ViewBag.userId = new SelectList(db.AspNetUsers, "Id", "Email", user_Admin_Detail.userId);
            return(View(user_Admin_Detail));
        }