Exemplo n.º 1
0
        /// <summary>
        /// 获取前台当前页面栏目内容类型
        /// </summary>
        /// <returns></returns>
        string GetColumnMode()
        {
            if (Request["mode"] != null)
            {
                return(Request["mode"]);
            }
            else
            {
                if (ArticleID != null && ArticleID != "")
                {
                    Article a         = ArticleHelper.GetArticle(ArticleID);
                    string  channelID = "";
                    if (a != null)
                    {
                        channelID = a.OwnerID;
                    }
                    if (channelID != "")
                    {
                        Channel ch = this.ChannelHelper.GetChannel(channelID, new string[] { "EnumState" });
                        //string type = StateManagement.GetStateName(ch.EnumState, UserEnumLibrary.Business.ArticleType).ToString();
                        EnumLibrary.ArticleType type = (EnumLibrary.ArticleType)StateMgr.GetStateValueEnum(ch.EnumState, EnumLibrary.Business.ArticleType);
                        if (type == EnumLibrary.ArticleType.Product)
                        {
                            return("productDetail");
                        }
                        else if (type == EnumLibrary.ArticleType.Article)
                        {
                            return("detail");
                        }
                        else
                        {
                            return("contentMode");
                        }
                    }
                    else if (AdviceHelper.Exist(ArticleID))
                    {
                        return("adviceMode");
                    }
                    else
                    {
                        return(string.Empty);
                    }
                }

                else
                {
                    return(string.Empty);
                }
            }
        }