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)); }
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)); }
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")); }
// 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)); }