Esempio n. 1
0
        public static CustomList <Gen_Currency> GetAllGen_Currency()
        {
            ConnectionManager         conManager             = new ConnectionManager(ConnectionName.HR);
            CustomList <Gen_Currency> Gen_CurrencyCollection = new CustomList <Gen_Currency>();
            IDataReader  reader = null;
            const String sql    = "Select *from Gen_Currency";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Gen_Currency newGen_Currency = new Gen_Currency();
                    newGen_Currency.SetData(reader);
                    Gen_CurrencyCollection.Add(newGen_Currency);
                }
                return(Gen_CurrencyCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Esempio n. 2
0
 public static CustomList<Gen_Currency> GetAllGen_Currency()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<Gen_Currency> Gen_CurrencyCollection = new CustomList<Gen_Currency>();
     IDataReader reader = null;
     const String sql = "Select *from Gen_Currency";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Gen_Currency newGen_Currency = new Gen_Currency();
             newGen_Currency.SetData(reader);
             Gen_CurrencyCollection.Add(newGen_Currency);
         }
         return Gen_CurrencyCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }