public void DeleteCartItemTest()
 {
     _ShopListPresentationModel.GetCurrentProduce("1", 0, "主機板");
     _ShopListPresentationModel.AddItemToCart();
     Assert.AreEqual(_ShopListPresentationModel.RowCount, 1);
     _ShopListPresentationModel.DeleteCartItem(0);
     Assert.AreEqual(_ShopListPresentationModel.RowCount, 0);
 }
示例#2
0
 // 刪除項目
 private void DeleteItem(DataGridViewCellEventArgs e)
 {
     _orderDataGridView.Rows.Remove(_orderDataGridView.Rows[e.RowIndex]);
     _shopListPresentationModel.DeleteCartItem(e.RowIndex);
 }