Beispiel #1
0
 private void btn_update_Click(object sender, EventArgs e)
 {
     if ((txt_deleteID.Text != "") && (txt_updateqty.Text != ""))
     {
         _connection.UpdateStock(new StockRecord(int.Parse(txt_deleteID.Text), "", 0, 0, int.Parse(txt_updateqty.Text)));
     }
 }
Beispiel #2
0
        public void TestEditStockItem()
        {
            ClientConnectionManager p = new ClientConnectionManager("127.0.0.1", 25565);

            Assert.IsTrue(p.ConnectToServer());

            p.InsertStock("Apple", 0.5, 1, 100);
            StockRecord lid = p.RequestStockInfo(-1)[0];

            Assert.IsTrue(p.UpdateStock(lid));
        }