Ejemplo n.º 1
0
 private List<KSkladistar> DajPopisSkladištara(ref Terminal _terminal)
 {
     List<KSkladistar> entities = new List<KSkladistar>();
     MTrenisClient c = new MTrenisClient();
     try
     {
         string[] macAdrese = new string[_terminal.macAdrese.Count];
         for (int i = 0; i < _terminal.macAdrese.Count; i++)
         {
             macAdrese[i] = _terminal.macAdrese[i];
         }
         Skladistar[] k = c.DohvatiKorisnikeTerminala(macAdrese);
         for (int i = 0; i < k.Length; i++)
         {
             entities.Add(new KSkladistar(k[i].mBr, k[i].ime, k[i].prezime, null));
         }
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         if (c != null && c.State != CommunicationState.Closed)
         {
             c.Close();
         }
     }
     return entities;
 }