private void RFIDReader_HandDataBack(object sender, DataEventArgs e)
 {
     string[] rfids = e.Data?.Split(';');
     if (rfids != null && rfids.Length > 0)
     {
         ToolDao toolDao = new ToolDao();
         var     rlt     = toolDao.GetToolByRFID(rfids[0]);
         if (rlt.HasError)
         {
             MessageAlert.Alert(rlt.Msg);
             return;
         }
         if (rlt.Entities != null)
         {
             TransforTool(rlt.Entities);
         }
     }
 }
Example #2
0
 private void RFIDReader_HandDataBack(object sender, Helper.DataEventArgs e)
 {
     string[] rfids = e.Data?.Split(';');
     if (rfids != null && rfids.Length > 0)
     {
         ToolDao toolDao = new ToolDao();
         foreach (var rfid in rfids)
         {
             //判断是否已经存在于领用列表
             if (ExistRFID(rfid))
             {
                 continue;
             }
             var rlt = toolDao.GetToolByRFID(rfid);
             if (!rlt.HasError && rlt.Entities != null)
             {
                 TransforTool(rlt.Entities);
             }
         }
     }
 }