예제 #1
0
 public new IDomainObject VratiObjekat(SqlDataReader reader)
 {
     try
     {
         Prevoznik company = new Prevoznik();
         while (reader.Read())
         {
             company.Id             = (long)reader[0];
             company.NazivKompanije = reader[1].ToString();
             break;
         }
         return(company);
     }
     catch (Exception)
     {
         return(null);
     }
 }
예제 #2
0
 public new List <IDomainObject> VratiListu(SqlDataReader reader)
 {
     try
     {
         List <IDomainObject> companies = new List <IDomainObject>();
         while (reader.Read())
         {
             Prevoznik company = new Prevoznik
             {
                 Id             = (long)reader[0],
                 NazivKompanije = reader[1].ToString()
             };
             companies.Add(company);
         }
         return(companies);
     }
     catch (Exception)
     {
         return(null);
     }
 }