예제 #1
0
        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();
                }
            }
        }
예제 #2
0
        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();
                }
            }
        }
예제 #3
0
 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();
     }
 }
예제 #4
0
 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();
     }
 }