コード例 #1
0
        public static List <MenuInfo> GetFooterMenu(int PortalID, string UserName, string CultureCode)
        {
            List <MenuInfo> lstPages            = new List <MenuInfo>();
            string          StoredProcedureName = "[dbo].[usp_SageMenuGetFooter]";
            List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();

            ParaMeterCollection.Add(new KeyValuePair <string, object>("@PortalID", PortalID));
            ParaMeterCollection.Add(new KeyValuePair <string, object>("@UserName", UserName));
            ParaMeterCollection.Add(new KeyValuePair <string, object>("@CultureCode", CultureCode));
            SqlDataReader SQLReader = null;

            try
            {
                SQLHandler sagesql = new SQLHandler();
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
                while (SQLReader.Read())
                {
                    MenuInfo objMenu = new MenuInfo();
                    objMenu.PageID        = int.Parse(SQLReader["PageID"].ToString());
                    objMenu.PageOrder     = int.Parse(SQLReader["PageOrder"].ToString());
                    objMenu.ParentID      = int.Parse(SQLReader["ParentID"].ToString());
                    objMenu.Level         = int.Parse(SQLReader["Level"].ToString());
                    objMenu.LevelPageName = SQLReader["LevelPageName"].ToString();
                    objMenu.SEOName       = SQLReader["SEOName"].ToString();
                    objMenu.TabPath       = SQLReader["TabPath"].ToString();
                    objMenu.IsVisible     = bool.Parse(SQLReader["IsVisible"].ToString());
                    objMenu.ShowInMenu    = bool.Parse(SQLReader["ShowInMenu"].ToString());
                    objMenu.PageName      = SQLReader["PageName"].ToString();
                    lstPages.Add(objMenu);
                }
                return(lstPages);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }
        }
コード例 #2
0
 public static List<MenuInfo> GetMenuFront(int PortalID, string UserName, string CultureCode)
 {
     List<MenuInfo> lstPages = new List<MenuInfo>();
     string StoredProcedureName = "[dbo].[usp_SageMenuGetClientView]";
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@prefix", "---"));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsDeleted", 0));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserName", UserName));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@CultureCode", CultureCode));
     SqlDataReader SQLReader = null;
     try
     {
         SQLHandler sagesql = new SQLHandler();
         SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
         while (SQLReader.Read())
         {
             MenuInfo objMenu = new MenuInfo();
             objMenu.PageID = int.Parse(SQLReader["PageID"].ToString());
             objMenu.PageOrder = int.Parse(SQLReader["PageOrder"].ToString());
             objMenu.ParentID = int.Parse(SQLReader["ParentID"].ToString());
             objMenu.Level = int.Parse(SQLReader["Level"].ToString());
             objMenu.LevelPageName = SQLReader["LevelPageName"].ToString();
             objMenu.SEOName = SQLReader["SEOName"].ToString();
             objMenu.TabPath = SQLReader["TabPath"].ToString();
             objMenu.IsVisible = bool.Parse(SQLReader["IsVisible"].ToString());
             objMenu.ShowInMenu = bool.Parse(SQLReader["ShowInMenu"].ToString());
             objMenu.IconFile = SQLReader["IconFile"].ToString();
             lstPages.Add(objMenu);
         }
     }
     catch (Exception e)
     {
         throw e;
     }
     finally
     {
         if (SQLReader != null)
         {
             SQLReader.Close();
         }
     }
     return lstPages;
 }
コード例 #3
0
        public static List <MenuInfo> GetSideMenu(int PortalID, string UserName, int menuID, string CultureCode)
        {
            List <MenuInfo> lstPages            = new List <MenuInfo>();
            string          StoredProcedureName = "usp_SageMenuGetSideMenu";
            List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >();

            ParaMeterCollection.Add(new KeyValuePair <string, object>("PortalID", PortalID));
            ParaMeterCollection.Add(new KeyValuePair <string, object>("UserName", UserName));
            ParaMeterCollection.Add(new KeyValuePair <string, object>("MenuID", menuID));
            ParaMeterCollection.Add(new KeyValuePair <string, object>("CultureCode", CultureCode));
            OracleDataReader SQLReader = null;

            try
            {
                OracleHandler sagesql = new OracleHandler();
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
                while (SQLReader.Read())
                {
                    MenuInfo objMenu = new MenuInfo();
                    objMenu.PageID        = int.Parse(SQLReader["PageID"].ToString());
                    objMenu.PageOrder     = int.Parse(SQLReader["PageOrder"].ToString());
                    objMenu.PageName      = SQLReader["PageName"].ToString();
                    objMenu.ParentID      = int.Parse(SQLReader["ParentID"].ToString());
                    objMenu.Level         = int.Parse(SQLReader["Level"].ToString());
                    objMenu.TabPath       = SQLReader["TabPath"].ToString();
                    objMenu.LevelPageName = SQLReader["LevelPageName"].ToString();

                    lstPages.Add(objMenu);
                }
                return(lstPages);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }
        }
コード例 #4
0
        public static List <MenuInfo> GetAdminMenu()
        {
            List <MenuInfo> lstPages            = new List <MenuInfo>();
            string          StoredProcedureName = "[dbo].[usp_sagemenugetadminmenu]";
            SqlDataReader   SQLReader           = null;

            try
            {
                SQLHandler sagesql = new SQLHandler();
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName);
                while (SQLReader.Read())
                {
                    MenuInfo objMenu = new MenuInfo();
                    objMenu.PageID        = int.Parse(SQLReader["PageID"].ToString());
                    objMenu.PageOrder     = int.Parse(SQLReader["PageOrder"].ToString());
                    objMenu.ParentID      = int.Parse(SQLReader["ParentID"].ToString());
                    objMenu.Level         = int.Parse(SQLReader["Level"].ToString());
                    objMenu.LevelPageName = SQLReader["LevelPageName"].ToString();
                    objMenu.SEOName       = SQLReader["SEOName"].ToString();
                    objMenu.TabPath       = SQLReader["TabPath"].ToString();
                    objMenu.IsVisible     = bool.Parse(SQLReader["IsVisible"].ToString());
                    objMenu.ShowInMenu    = bool.Parse(SQLReader["ShowInMenu"].ToString());
                    objMenu.PageName      = SQLReader["PageName"].ToString();
                    lstPages.Add(objMenu);
                }
                return(lstPages);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }
        }
コード例 #5
0
 public static List<MenuInfo> GetBackEndMenu(int ParentNodeID, string UserName, int PortalID, string CultureCode)
 {
     List<MenuInfo> lstPages = new List<MenuInfo>();
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@ParentNodeID", ParentNodeID));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserName", UserName));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@CultureCode", CultureCode));
     string StoredProcedureName = "[usp_SageMenuAdminGet]";
     SqlDataReader SQLReader = null;
     try
     {
         SQLHandler sagesql = new SQLHandler();
         SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
         while (SQLReader.Read())
         {
             MenuInfo objMenu = new MenuInfo();
             objMenu.PageID = int.Parse(SQLReader["PageID"].ToString());
             objMenu.PageOrder = int.Parse(SQLReader["PageOrder"].ToString());
             objMenu.PageName = SQLReader["PageName"].ToString();
             objMenu.ParentID = int.Parse(SQLReader["ParentID"].ToString());
             objMenu.Level = int.Parse(SQLReader["Level"].ToString());
             objMenu.TabPath = SQLReader["TabPath"].ToString();
             lstPages.Add(objMenu);
         }
         return lstPages;
     }
     catch (Exception e)
     {
         throw e;
     }
     finally
     {
         if (SQLReader != null)
         {
             SQLReader.Close();
         }
     }
 }
コード例 #6
0
        public static List<MenuInfo> GetAdminMenu()
        {
            List<MenuInfo> lstPages = new List<MenuInfo>();
            string StoredProcedureName = "[dbo].[usp_sagemenugetadminmenu]";
            SqlDataReader SQLReader = null;
            try
            {
                SQLHandler sagesql = new SQLHandler();
                SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName);
                while (SQLReader.Read())
                {
                    MenuInfo objMenu = new MenuInfo();
                    objMenu.PageID = int.Parse(SQLReader["PageID"].ToString());
                    objMenu.PageOrder = int.Parse(SQLReader["PageOrder"].ToString());
                    objMenu.ParentID = int.Parse(SQLReader["ParentID"].ToString());
                    objMenu.Level = int.Parse(SQLReader["Level"].ToString());
                    objMenu.LevelPageName = SQLReader["LevelPageName"].ToString();
                    objMenu.SEOName = SQLReader["SEOName"].ToString();
                    objMenu.TabPath = SQLReader["TabPath"].ToString();
                    objMenu.IsVisible = bool.Parse(SQLReader["IsVisible"].ToString());
                    objMenu.ShowInMenu = bool.Parse(SQLReader["ShowInMenu"].ToString());
                    objMenu.PageName = SQLReader["PageName"].ToString();
                    lstPages.Add(objMenu);
                }
                return lstPages;
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (SQLReader != null)
                {
                    SQLReader.Close();
                }
            }

        }