示例#1
0
 public IDomainObject VratiObjekat(SqlDataReader reader)
 {
     try
     {
         NacinIsporuke isporuka = new NacinIsporuke();
         while (reader.Read())
         {
             isporuka.Id            = (long)reader[0];
             isporuka.NazivIsporuke = reader[1].ToString();
             break;
         }
         return(isporuka);
     }
     catch (Exception)
     {
         return(null);
     }
 }
示例#2
0
 public List <IDomainObject> VratiListu(SqlDataReader reader)
 {
     try
     {
         List <IDomainObject> isporuke = new List <IDomainObject>();
         while (reader.Read())
         {
             NacinIsporuke isporuka = new NacinIsporuke
             {
                 Id            = (long)reader[0],
                 NazivIsporuke = reader[1].ToString()
             };
             isporuke.Add(isporuka);
         }
         return(isporuke);
     }
     catch (Exception)
     {
         return(null);
     }
 }