예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="menuType"></param>
 /// <returns></returns>
 public static List <int> GetAllChildIdByParent(int parent, EMenuType menuType)
 {
     return(SQLDataAccess.ExecuteReadColumn <int>(
                "[CMS].[sp_GetChildMenuItemByParent]",
                CommandType.StoredProcedure,
                "MenuItemID",
                new SqlParameter("@MenuType", menuType.ToString()),
                new SqlParameter("@ParentId", parent)));
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="mItemId"></param>
 /// <param name="menuType"> </param>
 /// <returns></returns>
 public static IEnumerable <int> GetParentMenuItems(int mItemId, EMenuType menuType)
 {
     return(SQLDataAccess.ExecuteReadColumnIEnumerable <int>(
                "[CMS].[sp_GetParentMenuItemsByItemId]",
                CommandType.StoredProcedure,
                "MenuItemID",
                new SqlParameter("@MenuItemID", mItemId),
                new SqlParameter("@MenuType", menuType.ToString())));
 }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="mItem"></param>
 /// <param name="menuType"> </param>
 public static void UpdateMenuItem(AdvMenuItem mItem, EMenuType menuType)
 {
     SQLDataAccess.ExecuteNonQuery(
         "[CMS].[sp_UpdateMenuItemByItemId]",
         CommandType.StoredProcedure,
         new SqlParameter("@MenuType", menuType.ToString()),
         new SqlParameter("@MenuItemID", mItem.MenuItemID),
         new SqlParameter("@MenuItemParentID", mItem.MenuItemParentID == 0 ? DBNull.Value : (object)mItem.MenuItemParentID),
         new SqlParameter("@MenuItemName", mItem.MenuItemName),
         new SqlParameter("@MenuItemIcon", string.IsNullOrEmpty(mItem.MenuItemIcon) ? DBNull.Value : (object)mItem.MenuItemIcon),
         new SqlParameter("@MenuItemUrlPath", mItem.MenuItemUrlPath),
         new SqlParameter("@MenuItemUrlType", mItem.MenuItemUrlType),
         new SqlParameter("@SortOrder", mItem.SortOrder),
         new SqlParameter("@ShowMode", mItem.ShowMode),
         new SqlParameter("@Enabled", mItem.Enabled),
         new SqlParameter("@Blank", mItem.Blank));
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="mItem"></param>
 /// <param name="menuType"> </param>
 public static void UpdateMenuItem(AdvMenuItem mItem, EMenuType menuType)
 {
     SQLDataAccess.ExecuteNonQuery(
         "[CMS].[sp_UpdateMenuItemByItemId]",
         CommandType.StoredProcedure,
         new SqlParameter("@MenuType", menuType.ToString()),
         new SqlParameter("@MenuItemID", mItem.MenuItemID),
         new SqlParameter("@MenuItemParentID", mItem.MenuItemParentID == 0 ? DBNull.Value : (object)mItem.MenuItemParentID),
         new SqlParameter("@MenuItemName", mItem.MenuItemName),
         new SqlParameter("@MenuItemIcon", string.IsNullOrEmpty(mItem.MenuItemIcon) ? DBNull.Value : (object)mItem.MenuItemIcon),
         new SqlParameter("@MenuItemUrlPath", mItem.MenuItemUrlPath),
         new SqlParameter("@MenuItemUrlType", mItem.MenuItemUrlType),
         new SqlParameter("@SortOrder", mItem.SortOrder),
         new SqlParameter("@ShowMode", mItem.ShowMode),
         new SqlParameter("@Enabled", mItem.Enabled),
         new SqlParameter("@Blank", mItem.Blank),
         new SqlParameter("@NoFollow", mItem.NoFollow));
 }
예제 #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="mItemId"></param>
 /// <param name="menuType"> </param>
 /// <returns></returns>
 public static IEnumerable<int> GetParentMenuItems(int mItemId, EMenuType menuType)
 {
     return SQLDataAccess.ExecuteReadColumnIEnumerable<int>(
         "[CMS].[sp_GetParentMenuItemsByItemId]",
         CommandType.StoredProcedure,
         "MenuItemID",
         new SqlParameter("@MenuItemID", mItemId),
         new SqlParameter("@MenuType", menuType.ToString()));
 }
예제 #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="menuType"></param>
 /// <returns></returns>
 public static List<int> GetAllChildIdByParent(int parent, EMenuType menuType)
 {
     return SQLDataAccess.ExecuteReadColumn<int>(
          "[CMS].[sp_GetChildMenuItemByParent]",
          CommandType.StoredProcedure,
          "MenuItemID",
          new SqlParameter("@MenuType", menuType.ToString()),
          new SqlParameter("@ParentId", parent));
 }