public static CustomList <AccChequeStatusList> GetAllAccChequeStatusList() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <AccChequeStatusList> AccChequeStatusListCollection = new CustomList <AccChequeStatusList>(); IDataReader reader = null; const String sql = "select *from AccChequeStatusList"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { AccChequeStatusList newAccChequeStatusList = new AccChequeStatusList(); newAccChequeStatusList.SetData(reader); AccChequeStatusListCollection.Add(newAccChequeStatusList); } return(AccChequeStatusListCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList<AccChequeStatusList> GetAllAccChequeStatusList() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<AccChequeStatusList> AccChequeStatusListCollection = new CustomList<AccChequeStatusList>(); IDataReader reader = null; const String sql = "select *from AccChequeStatusList"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { AccChequeStatusList newAccChequeStatusList = new AccChequeStatusList(); newAccChequeStatusList.SetData(reader); AccChequeStatusListCollection.Add(newAccChequeStatusList); } return AccChequeStatusListCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }