public static int Add(AJH.CMS.Core.Entities.Attribute attribute)
 {
     return AttributeDataMapper.Add(attribute);
 }
 public static void AddOtherLanguage(AJH.CMS.Core.Entities.Attribute attribute)
 {
     AttributeDataMapper.AddOtherLanguage(attribute);
 }
 public static void Update(AJH.CMS.Core.Entities.Attribute attribute)
 {
     AttributeDataMapper.Update(attribute);
 }
        internal static void FillFromReader(AJH.CMS.Core.Entities.Attribute attribute, SqlDataReader reader)
        {
            int colIndex = 0;
            colIndex = reader.GetOrdinal(CN_ATTRIBUTE_ID);
            if (!reader.IsDBNull(colIndex))
                attribute.ID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_ATTRIBUTE_GROUP_ID);
            if (!reader.IsDBNull(colIndex))
                attribute.GroupID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_ATTRIBUTE_PORTAL_ID);
            if (!reader.IsDBNull(colIndex))
                attribute.PortalID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_NAME);
            if (!reader.IsDBNull(colIndex))
                attribute.Name = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_LAN_ID);
            if (!reader.IsDBNull(colIndex))
                attribute.LanguageID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_ATTRIBUTE_IS_DELETED);
            if (!reader.IsDBNull(colIndex))
                attribute.IsDeleted = reader.GetBoolean(colIndex);

        }
        private TreeNode GetNodesChilds(AJH.CMS.Core.Entities.Category category, List<AJH.CMS.Core.Entities.Category> categories)
        {
            TreeNode oNode;
            oNode = new TreeNode(category.ID + ": " + category.Name, Convert.ToString(category.ID));
            //oNode.ImageUrl = GetPublishImage(menu.ID);

            if (ViewState[CMSViewStateManager.CategoryID] != null)
            {
                int CategorySelected = Convert.ToInt32(ViewState[CMSViewStateManager.CategoryID]);
                if (CategorySelected > 0 && oNode.Value == CategorySelected.ToString())
                {
                    oNode.Selected = true;
                }
            }

            List<AJH.CMS.Core.Entities.Category> categoryChilds = categories.Where(m => m.ParentID == category.ID).ToList();
            if (categoryChilds.Count > 0)
            {
                foreach (AJH.CMS.Core.Entities.Category categoryChild in categoryChilds)
                {
                    oNode.ChildNodes.Add(GetNodesChilds(categoryChild, categories));
                }
            }
            return oNode;
        }
        private TreeNode GetNodesChilds(AJH.CMS.Core.Entities.Menu menu, List<AJH.CMS.Core.Entities.Menu> menus)
        {
            TreeNode oNode;
            oNode = new TreeNode(menu.ID + ": " + menu.Name, Convert.ToString(menu.ID));
            //oNode.ImageUrl = GetPublishImage(menu.ID);

            oNode.ImageUrl = CMSWebHelper.GetPublishedImage(menu.IsPublished);

            if (ViewState[CMSViewStateManager.MenuID] != null)
            {
                int MenuSelected = Convert.ToInt32(ViewState[CMSViewStateManager.MenuID]);
                if (MenuSelected > 0 && oNode.Value == MenuSelected.ToString())
                {
                    oNode.Selected = true;
                }
            }

            List<AJH.CMS.Core.Entities.Menu> menuChilds = menus.Where(m => m.ParentID == menu.ID).ToList();
            if (menuChilds.Count > 0)
            {
                foreach (AJH.CMS.Core.Entities.Menu menuChild in menuChilds)
                {
                    oNode.ChildNodes.Add(GetNodesChilds(menuChild, menus));
                }
            }
            return oNode;
        }