Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            APTUser aPTUser = db.APTUsers.Find(id);

            db.APTUsers.Remove(aPTUser);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "UserId,FullName,UserName,Password,Email,PhoneNumber,IsActive,CreatedBy,CreatedDate,UpdatedBy,UpdatedDate")] APTUser aPTUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aPTUser).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aPTUser));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "UserId,FullName,UserName,Password,Email,PhoneNumber,IsActive,CreatedBy,CreatedDate,UpdatedBy,UpdatedDate")] APTUser aPTUser)
        {
            if (ModelState.IsValid)
            {
                db.APTUsers.Add(aPTUser);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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