예제 #1
0
        public ActionResult DeleteConfirmed(byte id)
        {
            HistoryOfStockInfo historyOfStockInfo = db.HistoryOfStockInfoes.Find(id);

            db.HistoryOfStockInfoes.Remove(historyOfStockInfo);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "StockId,Symbol,PercentChange,AverageVolume,LastPrice,MarketTime,OpenPrice,HighPrice,LowPrice,YearWeekHigh,YearWeekLow,Date")] HistoryOfStockInfo historyOfStockInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(historyOfStockInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Symbol = new SelectList(db.CurrentStockInfoes, "Symbol", "PercentChange", historyOfStockInfo.Symbol);
     return(View(historyOfStockInfo));
 }
        // GET: HistoryOfStockInfoes/Details/5
        public ActionResult Details(byte?id, DateTime date)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HistoryOfStockInfo historyOfStockInfo = db.HistoryOfStockInfoes.Find(id, date);

            if (historyOfStockInfo == null)
            {
                return(HttpNotFound());
            }
            return(View(historyOfStockInfo));
        }
예제 #4
0
        // GET: HistoryOfStockInfoes/Edit/5
        public ActionResult Edit(byte?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HistoryOfStockInfo historyOfStockInfo = db.HistoryOfStockInfoes.Find(id);

            if (historyOfStockInfo == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Symbol = new SelectList(db.CurrentStockInfoes, "Symbol", "PercentChange", historyOfStockInfo.Symbol);
            return(View(historyOfStockInfo));
        }