Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed([Bind(Include = "READERID,WRITERID")] ATTENTION aTTENTION)
        {
            db.ATTENTION.Remove(aTTENTION);
            db.SaveChanges();
            WRITER wRITER = db.WRITER.Find(aTTENTION.WRITERID);

            wRITER.NUMFANS = wRITER.NUMFANS - 1;
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        // GET: ATTENTIONs/Delete/5
        public ActionResult Delete([Bind(Include = "READERID,WRITERID")] ATTENTION a)
        {
            ATTENTION aTTENTION = db.ATTENTION.Find(a);

            if (aTTENTION == null)
            {
                return(HttpNotFound());
            }
            return(View(aTTENTION));
        }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "READERID,WRITERID")] ATTENTION aTTENTION)
        {
            if (ModelState.IsValid)
            {
                db.ATTENTION.Add(aTTENTION);
                db.SaveChanges();
                WRITER wRITER = db.WRITER.Find(aTTENTION.WRITERID);
                wRITER.NUMFANS = wRITER.NUMFANS + 1;

                return(RedirectToAction("Index"));
            }

            return(View(aTTENTION));
        }