예제 #1
0
 public void BarcodeWasScanned(int barcode)
 {
     currentProduct = ProductsDAO.SearchUsingBarcode(barcode);         //Find product in the database and store it
     scannedProducts.Add(currentProduct);                              //Add product to ScannedProducts
     ProductsList[i]   = currentProduct;                               //put current product into productslist
     mostRecentProduct = ProductsList[i];                              //gets recent product from list
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight()); //Use to SetExpectedWeight in BaggingAreaScale to new weight
     ++i;                                                              //adds to index of products
 }
예제 #2
0
 public void BarcodeWasScanned(int barcode)
 {
     scannedProducts.Add(ProductsDAO.SearchUsingBarcode(barcode));
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight());
 }