/// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadGetUrlPara();                                                 //获取url参数

                if (CheckIsExistChild(ConvertHelper.ConvertLong(InfoCategoryID))) //检查是否存在子项
                {
                    LoadChildContent(ConvertHelper.ConvertLong(InfoCategoryID));
                }
                else
                {
                    DataTable dtParent = WebInfoLogic.GetParentCategoryName(InfoCategoryID);

                    if (dtParent.Rows.Count > 0)
                    {
                        LoadChildContent(ConvertHelper.ConvertLong(dtParent.Rows[0]["ParentInfoCategoryID"]));
                    }
                    else
                    {
                        LoadParent(ConvertHelper.ConvertLong(InfoCategoryID));
                    }
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// 位置信息
        /// </summary>
        /// <param name="webInfoID"></param>
        public void LoadInfo(string webInfoID)
        {
            if (ConvertHelper.ConvertString(webInfoID) != "0")
            {
                DataTable dt = WebInfoLogic.GetParentCategoryName(webInfoID);

                if (dt.Rows.Count > 0)
                {
                    if (dt.Rows[0][0].ToString() != "0")
                    {
                        DataTable dtname = WebInfoLogic.GetCategoryName(webInfoID);

                        if (WebInfoLogic.IsExistChild(ConvertHelper.ConvertLong(webInfoID)))
                        {
                            _str = string.Format(">><a href=InfoList.aspx?InfoCategoryID={0} target=\"_self\">{1}</a>", webInfoID, dtname.Rows[0]["InfoCategoryName"].ToString()) + _str;
                        }
                        else
                        {
                            _str = string.Format(">><a href=Info.aspx?InfoCategoryID={0} target=\"_self\">{1}</a>", webInfoID, dtname.Rows[0]["InfoCategoryName"].ToString()) + _str;
                        }

                        LoadInfo(dtname.Rows[0]["ParentInfoCategoryID"].ToString());
                    }
                    else
                    {
                        DataTable dtname = WebInfoLogic.GetCategoryName(webInfoID);

                        if (WebInfoLogic.IsExistChild(ConvertHelper.ConvertLong(webInfoID)))
                        {
                            _str = string.Format(">><a href=InfoList.aspx?InfoCategoryID={0} target=\"_self\">{1}</a>", webInfoID, dtname.Rows[0]["InfoCategoryName"].ToString()) + _str;
                        }
                        else
                        {
                            _str = string.Format(">><a href=Info.aspx?InfoCategoryID={0} target=\"_self\">{1}</a>", webInfoID, dtname.Rows[0]["InfoCategoryName"].ToString()) + _str;
                        }
                    }
                }
            }
            else
            {
                if (ConvertHelper.ConvertString(webInfoID) == "0")
                {
                    _str = string.Format(">><a href=InfoList.aspx?InfoCategoryID={0} target=\"_self\">{1}</a>", "0", "文化动态");
                }
            }
        }