Example #1
0
        public static CustomList <ItemGroupDeptMaping> GetAllDept(Int32 entityID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <ItemGroupDeptMaping> HouseKeepingValueCollection = new CustomList <ItemGroupDeptMaping>();
            IDataReader reader = null;
            String      sql    = "select HKID DeptID,HKName Department from HouseKeepingValue Where EntityID=" + entityID;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ItemGroupDeptMaping newHouseKeepingValue = new ItemGroupDeptMaping();
                    newHouseKeepingValue.SetDataDept(reader);
                    HouseKeepingValueCollection.Add(newHouseKeepingValue);
                }
                return(HouseKeepingValueCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Example #2
0
        public static CustomList <ItemGroupDeptMaping> GetAllItemGroupDeptMaping(String itemGroupID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <ItemGroupDeptMaping> ItemGroupDeptMapingCollection = new CustomList <ItemGroupDeptMaping>();
            IDataReader reader = null;
            String      sql    = "select *from ItemGroupDeptMaping Where ItemGroupID=" + itemGroupID;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ItemGroupDeptMaping newItemGroupDeptMaping = new ItemGroupDeptMaping();
                    newItemGroupDeptMaping.SetData(reader);
                    ItemGroupDeptMapingCollection.Add(newItemGroupDeptMaping);
                }
                return(ItemGroupDeptMapingCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
 public static CustomList<ItemGroupDeptMaping> GetAllItemGroupDeptMaping(String itemGroupID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemGroupDeptMaping> ItemGroupDeptMapingCollection = new CustomList<ItemGroupDeptMaping>();
     IDataReader reader = null;
     String sql = "select *from ItemGroupDeptMaping Where ItemGroupID=" + itemGroupID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemGroupDeptMaping newItemGroupDeptMaping = new ItemGroupDeptMaping();
             newItemGroupDeptMaping.SetData(reader);
             ItemGroupDeptMapingCollection.Add(newItemGroupDeptMaping);
         }
         return ItemGroupDeptMapingCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public static CustomList<ItemGroupDeptMaping> GetAllDept(Int32 entityID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemGroupDeptMaping> HouseKeepingValueCollection = new CustomList<ItemGroupDeptMaping>();
     IDataReader reader = null;
     String sql = "select HKID DeptID,HKName Department from HouseKeepingValue Where EntityID=" + entityID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemGroupDeptMaping newHouseKeepingValue = new ItemGroupDeptMaping();
             newHouseKeepingValue.SetDataDept(reader);
             HouseKeepingValueCollection.Add(newHouseKeepingValue);
         }
         return HouseKeepingValueCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }