Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "employeeID,firstName,lastName,email,phone,employeeSince")] TheProfile theProfile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(theProfile).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(theProfile));
 }
Exemplo n.º 2
0
        public ActionResult Create([Bind(Include = "employeeID,firstName,lastName,email,phone,employeeSince")] TheProfile theProfile)
        {
            if (ModelState.IsValid)
            {
                db.TheProfiles.Add(theProfile);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(theProfile));
        }
Exemplo n.º 3
0
        // GET: TheProfiles/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TheProfile theProfile = db.TheProfiles.Find(id);

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