private void btnAdd_Click(object sender, RoutedEventArgs e) { stock = new CStock(); stock.Ticker = txtStock.Text; stock.Insert(); Refresh(); //Close(); }
public void InsertStocksTest() { CStock stock = new CStock("GOOG"); stock.Insert(); CStock newStock = new CStock(); newStock.LoadById(stock.Id); Assert.AreEqual(stock.Ticker, newStock.Ticker); }
public ActionResult Create(CStock collection) { try { // TODO: Add insert logic here collection.Insert(); return(RedirectToAction("Index")); } catch { return(View()); } }
public void InsertStockObj(CStock stock) { stock.Insert(); }