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

            db.General_user.Remove(general_user);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "user_id,Name,Password,Email,Contact_number,CNIC,Address,Country")] General_user general_user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(general_user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(general_user));
 }
Beispiel #3
0
        // GET: General_user/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            General_user general_user = db.General_user.Find(id);

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