Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Vid,Date,VBitcoin,VEthereum,VBitcoinCash,VLitecoin,VRipple")] VoteFinal voteFinal)
 {
     if (ModelState.IsValid)
     {
         db.Entry(voteFinal).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(voteFinal));
 }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "Vid,Date,VBitcoin,VEthereum,VBitcoinCash,VLitecoin,VRipple")] VoteFinal voteFinal)
        {
            if (ModelState.IsValid)
            {
                db.VoteFinals.Add(voteFinal);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(voteFinal));
        }
Ejemplo n.º 3
0
 public ActionResult Index([Bind(Include = "Vid,Date,Email,VBitcoin,VEthereum,VBitcoinCash,VLitecoin,VRipple")] VoteFinal vote)
 {
     if (ModelState.IsValid)
     {
         using (FYPEntities db = new FYPEntities())
         {
             db.VoteFinals.Add(vote);
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
     }
     return(View("Dash", "Dash"));
 }
Ejemplo n.º 4
0
        // GET: VTestTbls/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VoteFinal voteFinal = db.VoteFinals.Find(id);

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