Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            recognitions recognitions = db.recognitions.Find(id);

            db.recognitions.Remove(recognitions);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "recognitionId,ID,description,values")] recognitions recognitions)
 {
     if (ModelState.IsValid)
     {
         db.Entry(recognitions).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID = new SelectList(db.userProfiles, "ID", "firstName", recognitions.ID);
     return(View(recognitions));
 }
Ejemplo n.º 3
0
        // GET: recognitions/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognitions recognitions = db.recognitions.Find(id);

            if (recognitions == null)
            {
                return(HttpNotFound());
            }
            return(View(recognitions));
        }
Ejemplo n.º 4
0
        // GET: recognitions/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognitions recognitions = db.recognitions.Find(id);

            if (recognitions == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID = new SelectList(db.userProfiles, "ID", "fullName", recognitions.ID);
            return(View(recognitions));
        }