Example #1
0
        public static CustomList <ReportSuiteMenu> GetReportList()
        {
            ConnectionManager            conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <ReportSuiteMenu> ReportSuiteMenuCollection = new CustomList <ReportSuiteMenu>();
            IDataReader reader = null;
            String      sql    = "EXEC spGetReportList";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ReportSuiteMenu newReportSuiteMenu = new ReportSuiteMenu();
                    newReportSuiteMenu.REPORTID  = reader.GetInt32("REPORTID");
                    newReportSuiteMenu.NODE_TEXT = reader.GetString("NODE_TEXT");
                    ReportSuiteMenuCollection.Add(newReportSuiteMenu);
                }
                return(ReportSuiteMenuCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Example #2
0
        public static CustomList <ReportSuiteMenu> GetReportSuiteMenu()
        {
            ConnectionManager            conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <ReportSuiteMenu> ReportSuiteMenuCollection = new CustomList <ReportSuiteMenu>();
            IDataReader reader = null;
            String      sql    = "EXEC spGetUserWiseProfileReport";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ReportSuiteMenu newReportSuiteMenu = new ReportSuiteMenu();
                    newReportSuiteMenu.SetData(reader);
                    ReportSuiteMenuCollection.Add(newReportSuiteMenu);
                }
                return(ReportSuiteMenuCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Example #3
0
        public static CustomList<ReportSuiteMenu> GetReportSuiteMenu()
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ReportSuiteMenu> ReportSuiteMenuCollection = new CustomList<ReportSuiteMenu>();
            IDataReader reader = null;
            String sql = "EXEC spGetUserWiseProfileReport";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ReportSuiteMenu newReportSuiteMenu = new ReportSuiteMenu();
                    newReportSuiteMenu.SetData(reader);
                    ReportSuiteMenuCollection.Add(newReportSuiteMenu);
                }
                return ReportSuiteMenuCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
Example #4
0
        public static CustomList<ReportSuiteMenu> GetReportList()
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ReportSuiteMenu> ReportSuiteMenuCollection = new CustomList<ReportSuiteMenu>();
            IDataReader reader = null;
            String sql = "EXEC spGetReportList";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ReportSuiteMenu newReportSuiteMenu = new ReportSuiteMenu();
                    newReportSuiteMenu.REPORTID = reader.GetInt32("REPORTID");
                    newReportSuiteMenu.NODE_TEXT = reader.GetString("NODE_TEXT");
                    ReportSuiteMenuCollection.Add(newReportSuiteMenu);
                }
                return ReportSuiteMenuCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }