Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PeerAssessment peerAssessment = db.PeerA.Find(id);

            db.PeerA.Remove(peerAssessment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "PEID,MID,SID,GID,PeerA,AssessedSID")] PeerAssessment peerAssessment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(peerAssessment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(peerAssessment));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "PEID,MID,SID,GID,PeerA,AssessedSID")] PeerAssessment peerAssessment)
        {
            if (ModelState.IsValid)
            {
                db.PeerA.Add(peerAssessment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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