/* * // GET: Admin/Create * public ActionResult Create() * { * return View(); * } * * // POST: Admin/Create * // To protect from overposting attacks, please enable the specific properties you want to bind to, for * // more details see https://go.microsoft.com/fwlink/?LinkId=317598. * [HttpPost] * [ValidateAntiForgeryToken] * public ActionResult Create([Bind(Include = "userID,userRole,phoneNumber,email")] User user) * { * if (ModelState.IsValid) * { * db.User.Add(user); * db.SaveChanges(); * return RedirectToAction("Index"); * } * * return View(user); * } */ // GET: Admin/Edit/5 //present the user modification information public ActionResult Edit(string userid) { if (userid == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (!DbLayer.CheckIAreaExists(area_id)) { return(HttpNotFound()); } return(View(DbLayer.getUser(userid))); }