Example #1
0
        public static CustomList <Gen_LookupEnt> GetAllGen_LookupEnt(API.DAO.enumsHr.enumEntitySetup entitySetup)
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <Gen_LookupEnt> Gen_LookupEntCollection = new CustomList <Gen_LookupEnt>();
            IDataReader reader = null;

            String sql = "select *from Gen_LookupEnt where EntityKey='" + (int)entitySetup + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Gen_LookupEnt newGen_LookupEnt = new Gen_LookupEnt();
                    newGen_LookupEnt.SetData(reader);
                    Gen_LookupEntCollection.Add(newGen_LookupEnt);
                }
                Gen_LookupEntCollection.InsertSpName = "spInsertGen_LookupEnt";
                Gen_LookupEntCollection.UpdateSpName = "spUpdateGen_LookupEnt";
                Gen_LookupEntCollection.DeleteSpName = "spDeleteGen_LookupEnt";
                return(Gen_LookupEntCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Example #2
0
        public static CustomList <Gen_LookupEnt> GetSalHeadGen_LookupEnt(Int32 entityKey)
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <Gen_LookupEnt> Gen_LookupEntCollection = new CustomList <Gen_LookupEnt>();
            IDataReader reader = null;
            String      sql    = "select ElementKey,ElementDesc,ElementName from Gen_LookupEnt where EntityKey='" + entityKey + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Gen_LookupEnt newGen_LookupEnt = new Gen_LookupEnt();
                    newGen_LookupEnt.SetDataSalaryHead(reader);
                    Gen_LookupEntCollection.Add(newGen_LookupEnt);
                }
                //Gen_LookupEntCollection.InsertSpName = "spInsertGen_LookupEnt";
                //Gen_LookupEntCollection.UpdateSpName = "spUpdateGen_LookupEnt";
                //Gen_LookupEntCollection.DeleteSpName = "spDeleteGen_LookupEnt";
                return(Gen_LookupEntCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Example #3
0
 public static CustomList<Gen_LookupEnt> GetSalHeadGen_LookupEnt(Int32 entityKey)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<Gen_LookupEnt> Gen_LookupEntCollection = new CustomList<Gen_LookupEnt>();
     IDataReader reader = null;
     String sql = "select ElementKey,ElementDesc,ElementName from Gen_LookupEnt where EntityKey='" + entityKey + "'";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Gen_LookupEnt newGen_LookupEnt = new Gen_LookupEnt();
             newGen_LookupEnt.SetDataSalaryHead(reader);
             Gen_LookupEntCollection.Add(newGen_LookupEnt);
         }
         //Gen_LookupEntCollection.InsertSpName = "spInsertGen_LookupEnt";
         //Gen_LookupEntCollection.UpdateSpName = "spUpdateGen_LookupEnt";
         //Gen_LookupEntCollection.DeleteSpName = "spDeleteGen_LookupEnt";
         return Gen_LookupEntCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Example #4
0
        public static CustomList<Gen_LookupEnt> GetAllGen_LookupEnt(API.DAO.enumsHr.enumEntitySetup entitySetup)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<Gen_LookupEnt> Gen_LookupEntCollection = new CustomList<Gen_LookupEnt>();
            IDataReader reader = null;

            String sql = "select *from Gen_LookupEnt where EntityKey='" + (int)entitySetup + "'";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Gen_LookupEnt newGen_LookupEnt = new Gen_LookupEnt();
                    newGen_LookupEnt.SetData(reader);
                    Gen_LookupEntCollection.Add(newGen_LookupEnt);
                }
                Gen_LookupEntCollection.InsertSpName = "spInsertGen_LookupEnt";
                Gen_LookupEntCollection.UpdateSpName = "spUpdateGen_LookupEnt";
                Gen_LookupEntCollection.DeleteSpName = "spDeleteGen_LookupEnt";
                return Gen_LookupEntCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }