public ActionResult Edit([Bind(Include = "ID,Symbol,Name,QuantityAvailable,MarketPrice")] StockData stockData)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stockData).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(stockData));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "UserId,UserName,Password,Name,CreateDate")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
 public ActionResult Edit([Bind(Include = "TransactionID,BlockID,TraderID,Symbol,QtyRequested,QtyAllocated,Type,Side,StatusID,TimeStamp")] Transaction transaction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(transaction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.StatusID = new SelectList(db.Status, "StatusID", "StatusName", transaction.StatusID);
     ViewBag.Symbol   = new SelectList(db.StockDatas, "Symbol", "Name", transaction.Symbol);
     return(View(transaction));
 }