示例#1
0
        public void Test_ClientTRK_ReadTagsRFID()
        {
            try
            {
                ClientTRK client = new ClientTRK();

                RFID rfid = client.ReadTagsRFID(true);
                Console.WriteLine("------------------ RFID ---------------------------");
                if (rfid != null)
                {
                    Console.WriteLine("rfid.part1 - {0}", rfid.part1);
                    Console.WriteLine("rfid.part2 - {0}", rfid.part2);
                    if (rfid.card != null)
                    {
                        Console.WriteLine("rfid.card - {0}", rfid.card);
                        Console.WriteLine("rfid.card.Id - {0}", rfid.card.Id);
                        Console.WriteLine("rfid.card.Active - {0}", rfid.card.Active);
                        Console.WriteLine("rfid.card.AutoNumber - {0}", rfid.card.AutoNumber);
                    }
                    else
                    {
                        Console.WriteLine("rfid.card = null");
                    }
                }
                else
                {
                    Console.WriteLine("rfid = null");
                }
                Console.WriteLine("--------------------------------------------------");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#2
0
 public IHttpActionResult GetReadTagsRFID()
 {
     try
     {
         RFID rfid = client.ReadTagsRFID(true);
         if (rfid == null)
         {
             return(NotFound());
         }
         return(Ok(rfid));
     }
     catch (Exception e)
     {
         String.Format("Ошибка выполнения метода API:GetReadTagsRFID()").SaveError(e);
         return(NotFound());
     }
 }