public void CheckConfirmButtonTest()
 {
     _ShopListPresentationModel.RowCount = 0;
     Assert.IsFalse(_ShopListPresentationModel.CheckConfirmButton());
     _ShopListPresentationModel.RowCount = 10;
     Assert.IsTrue(_ShopListPresentationModel.CheckConfirmButton());
 }
Beispiel #2
0
 // 點選DataGridView內容
 void ClickDataGridViewCell(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == -1 || e.RowIndex == -1)
     {
         return;
     }
     if (((DataGridView)sender).Columns[e.ColumnIndex].Name == DELETE_COLUMN) // 點選刪除
     {
         this.DeleteItem(e);
         this.ShowTotalPrice();
         this.CleanDetail();
     }
     _orderButton.Enabled = _shopListPresentationModel.CheckConfirmButton(); // 確認訂購按鈕可以按下
 }