public static CustomList <HouseKeepingValue> GetAllHouseKeepingValueForDropdown(Int32 parentID) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <HouseKeepingValue> HouseKeepingValueCollection = new CustomList <HouseKeepingValue>(); IDataReader reader = null; String sql = "EXEC spGetChangeEventHouseKeepingValue '" + parentID + "'"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { HouseKeepingValue newHouseKeepingValue = new HouseKeepingValue(); newHouseKeepingValue.SetDataForDropdown(reader); HouseKeepingValueCollection.Add(newHouseKeepingValue); } return(HouseKeepingValueCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <HouseKeepingValue> GetAllHouseKeeping(Int32 entityID) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <HouseKeepingValue> HouseKeepingValueCollection = new CustomList <HouseKeepingValue>(); IDataReader reader = null; String sql = "select HKID,HKName from HouseKeepingValue Where EntityID=" + entityID; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { HouseKeepingValue newHouseKeepingValue = new HouseKeepingValue(); newHouseKeepingValue.SetDataForDropdown(reader); HouseKeepingValueCollection.Add(newHouseKeepingValue); } return(HouseKeepingValueCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList<HouseKeepingValue> GetAllHouseKeepingValueForDropdown(Int32 parentID) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<HouseKeepingValue> HouseKeepingValueCollection = new CustomList<HouseKeepingValue>(); IDataReader reader = null; String sql = "EXEC spGetChangeEventHouseKeepingValue '" + parentID + "'"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { HouseKeepingValue newHouseKeepingValue = new HouseKeepingValue(); newHouseKeepingValue.SetDataForDropdown(reader); HouseKeepingValueCollection.Add(newHouseKeepingValue); } return HouseKeepingValueCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
public static CustomList<HouseKeepingValue> GetAllHouseKeeping(Int32 entityID) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<HouseKeepingValue> HouseKeepingValueCollection = new CustomList<HouseKeepingValue>(); IDataReader reader = null; String sql = "select HKID,HKName from HouseKeepingValue Where EntityID=" + entityID; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { HouseKeepingValue newHouseKeepingValue = new HouseKeepingValue(); newHouseKeepingValue.SetDataForDropdown(reader); HouseKeepingValueCollection.Add(newHouseKeepingValue); } return HouseKeepingValueCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }