SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using CheckoutLibrary;
  6.  
  7. namespace SumaApp
  8. {
  9.     class BarcoderCheckOut
  10.     {
  11.         private SumaClient.SupermarketService shop;
  12.         private SumaClient.Product[] AllProducts;/
  13.         CheckoutLibrary.BarcodeScanner scanner;
  14.        
  15.         public void CheckoutItem()
  16.         {
  17.             shop = new SumaClient.SupermarketService();
  18.             AllProducts = shop.GetAllProducts();
  19.         }
  20.  
  21.         public void On_click()
  22.         {
  23.             scanner = new CheckoutLibrary.BarcodeScanner();
  24.             scanner.ItemScanned += new CheckoutLibrary.BarcodeScanner.ItemScannedHandler(Scan);
  25.             scanner.AllItemsScanned += new CheckoutLibrary.BarcodeScanner.AllItemsScannedHandler(Allscanned);
  26.             scanner.Start(1);
  27.         }
  28.         public void Scan(ScanEventArgs ItemScan )
  29.         {
  30.             foreach (SumaClient.Product product in AllProducts)
  31.             {
  32.                 string listproduct;
  33.                 if (product.Barcode == ItemScan.Barcode)
  34.                 {
  35.                     listproduct = (product.Barcode.ToString() + " " + product.Description.ToString());
  36.  
  37.                 }
  38.  
  39.             }
  40.            
  41.         }
  42.         public void Allscanned(EventArgs ItemScanEnd )
  43.         {
  44.  
  45.         }
  46.  
  47.     }
  48. }
RAW Paste Data
Top