public IDomainObject VratiObjekat(SqlDataReader reader)
 {
     try
     {
         StavkaProforme stavka = new StavkaProforme();
         while (reader.Read())
         {
             stavka.RedniBroj = (long)reader[0];
             stavka.Proforma  = new Proforma()
             {
                 Id = (long)reader[1]
             };
             stavka.Kolicina = (int)reader[2];
             stavka.Lajsna   = new Lajsna()
             {
                 Id = (long)reader[3], NazivLajsne = reader[4].ToString()
             };
             break;
         }
         return(stavka);
     }
     catch (Exception)
     {
         return(null);
     }
 }
 public List <IDomainObject> VratiListu(SqlDataReader reader)
 {
     try
     {
         List <IDomainObject> stavke = new List <IDomainObject>();
         while (reader.Read())
         {
             StavkaProforme stavka = new StavkaProforme
             {
                 RedniBroj = (long)reader[0],
                 Proforma  = new Proforma()
                 {
                     Id = (long)reader[1]
                 },
                 Kolicina = (int)reader[2],
                 Lajsna   = new Lajsna()
                 {
                     Id = (long)reader[3], NazivLajsne = reader[4].ToString()
                 }
             };
             stavke.Add(stavka);
         }
         return(stavke);
     }
     catch (Exception)
     {
         return(null);
     }
 }