Example #1
0
 private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     stock        = new CStock();
     stock.Ticker = txtStock.Text;
     stock.Insert();
     Refresh();
     //Close();
 }
Example #2
0
        public void InsertStocksTest()
        {
            CStock stock = new CStock("GOOG");

            stock.Insert();

            CStock newStock = new CStock();

            newStock.LoadById(stock.Id);

            Assert.AreEqual(stock.Ticker, newStock.Ticker);
        }
Example #3
0
 public ActionResult Create(CStock collection)
 {
     try
     {
         // TODO: Add insert logic here
         collection.Insert();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #4
0
 public void InsertStockObj(CStock stock)
 {
     stock.Insert();
 }