Exemplo n.º 1
0
        public static void AddTitlePath(PathLinksClass pc, Label lblTitle)
        {
            if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id"))
            {
                int                  siteDepartmentID = Convert.ToInt32(HttpContext.Current.Request.QueryString["id"]);
                Languages            lang             = SiteSettings.GetCurrentLanguage();
                SiteDeparmentsEntity depObject        = SiteDeparmentsFactory.GetObject(siteDepartmentID, lang);

                if (depObject != null)
                {
                    if (pc != null)
                    {
                        pc.AddLink(depObject.Title, null);
                    }
                    if (lblTitle != null)
                    {
                        lblTitle.Text = depObject.Title;
                    }
                }
            }
        }
Exemplo n.º 2
0
        //---------------------------------------------------------
        //BuildDepartmentsPathLinks
        //---------------------------------------------------------
        public bool BuildDepartmentsPathLinks(int moduleDepartment, bool lastLink, bool setTags)
        {
            bool hasLinks = false;

            if (moduleDepartment > 0)
            {
                List <SiteDeparmentsEntity> sdp = SiteDeparmentsFactory.GetFullPath(moduleDepartment);
                if (sdp.Count > 0)
                {
                    hasLinks = true;
                    SiteDeparmentsEntity lastDep = null;
                    SiteDeparmentsEntity tempdep = null;
                    string url = "";
                    for (int i = 0; i < sdp.Count; i++)
                    {
                        tempdep = sdp[i];
                        if (lastLink && i == sdp.Count - 1)
                        {
                            lastDep = tempdep;
                            _PathControl.AddLink(tempdep.Title, null);
                            if (setTags)
                            {
                                DCMetaBuilder metaBuilder = DCMetaBuilder.Instance;
                                metaBuilder.Section = tempdep.Title;
                                metaBuilder.Title   = tempdep.Title;
                            }
                        }
                        else
                        {
                            url = GetSiteDepartmentsURl(tempdep.Url, tempdep.RelatedModuleTypeID, tempdep.RelatedPageID, tempdep.DepartmentID);
                            _PathControl.AddLink(tempdep.Title, url);
                        }
                    }
                }
            }
            return(hasLinks);
        }