Exemplo n.º 1
0
 /// <summary>
 /// 手持物理按键扫二维码,扫描到数据时
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void r2000Scanner1_BarcodeDataCaptured(object sender, Smobiler.Device.R2000BarcodeScanEventArgs e)
 {
     try
     {
         string    barCode = e.Data;
         DataTable table   = _autofacConfig.SettingService.GetAssetsBySN(barCode, LocatinId);
         gridAssRows.Cells.Clear();
         table.Columns.Add("IsChecked");
         foreach (DataRow Row in table.Rows)
         {
             if (Row["AssId"].ToString() == SelectAssId)
             {
                 Row["IsChecked"] = true;
             }
             else
             {
                 Row["IsChecked"] = false;
             }
         }
         if (table.Rows.Count > 0)
         {
             gridAssRows.DataSource = table;
             gridAssRows.DataBind();
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void r2000Scanner1_BarcodeDataCaptured(object sender, Smobiler.Device.R2000BarcodeScanEventArgs e)
 {
     this.label1.Text = e.Data;
 }