コード例 #1
0
        /// <summary>
        /// Handle data from the reader. Used in the scan mode.
        /// </summary>
        private void HandleData(Symbol.Barcode.ReaderData TheReaderData)
        {
            StockItem item = service.GetStockItem(TheReaderData.Text);

            if (item != null)
            {
                lblNo.Text              = item.No_;
                lblDescription.Text     = item.Description;
                lblCurrentStockUOM.Text = item.UOM;
                lblAmountUOM.Text       = item.UOM;
                lblNewStockUOM.Text     = item.UOM;
                lblCurrentStock.Text    = (item.StockQuantity != null ? ((decimal)item.StockQuantity).ToString("0.####################"):"0");
            }
            else
            {
                lblNo.Text          = TheReaderData.Text;
                lblDescription.Text = "Product code kon niet gevonden worden.";
            }
        }