Esempio n. 1
0
        public static CustomList <TreeGenerator> GetAllTreeGenerator()
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <TreeGenerator> TreeGeneratorCollection = new CustomList <TreeGenerator>();
            const String sql = "Select *from TreeGenerator";

            try
            {
                IDataReader reader;
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    TreeGenerator newTreeGenerator = new TreeGenerator();
                    newTreeGenerator.SetData(reader);
                    TreeGeneratorCollection.Add(newTreeGenerator);
                }
                reader.Close();
                TreeGeneratorCollection.SelectSpName = "spSelectTreeGenerator";
                TreeGeneratorCollection.InsertSpName = "spInsertTreeGenerator";
                TreeGeneratorCollection.UpdateSpName = "spUpdateTreeGenerator";
                TreeGeneratorCollection.SelectSpName = "spDeleteTreeGenerator";
                return(TreeGeneratorCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Esempio n. 2
0
        public static CustomList <TreeGenerator> GetAllTreeGeneratorWithOpeningAndWithoutPO()
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <TreeGenerator> TreeGeneratorCollection = new CustomList <TreeGenerator>();
            String sql = "EXEC spSWebTreeGeneratorWithAllItem";

            try
            {
                IDataReader reader;
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    TreeGenerator newTreeGenerator = new TreeGenerator();
                    newTreeGenerator.SetData(reader);
                    TreeGeneratorCollection.Add(newTreeGenerator);
                }
                reader.Close();
                return(TreeGeneratorCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Esempio n. 3
0
 public static CustomList<TreeGenerator> GetAllTreeGeneratorWithOpeningAndWithoutPO()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<TreeGenerator> TreeGeneratorCollection = new CustomList<TreeGenerator>();
     String sql = "EXEC spSWebTreeGeneratorWithAllItem";
     try
     {
         IDataReader reader;
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             TreeGenerator newTreeGenerator = new TreeGenerator();
             newTreeGenerator.SetData(reader);
             TreeGeneratorCollection.Add(newTreeGenerator);
         }
         reader.Close();
         return TreeGeneratorCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }
Esempio n. 4
0
 public static CustomList<TreeGenerator> GetAllTreeGenerator()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<TreeGenerator> TreeGeneratorCollection = new CustomList<TreeGenerator>();
     const String sql = "Select *from TreeGenerator";
     try
     {
         IDataReader reader;
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             TreeGenerator newTreeGenerator = new TreeGenerator();
             newTreeGenerator.SetData(reader);
             TreeGeneratorCollection.Add(newTreeGenerator);
         }
         reader.Close();
         TreeGeneratorCollection.SelectSpName = "spSelectTreeGenerator";
         TreeGeneratorCollection.InsertSpName = "spInsertTreeGenerator";
         TreeGeneratorCollection.UpdateSpName = "spUpdateTreeGenerator";
         TreeGeneratorCollection.SelectSpName = "spDeleteTreeGenerator";
         return TreeGeneratorCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }