/// <summary></summary>
        /// <param name="account"></param>
        /// <returns></returns>
        private string TryGetNavigationPortalIdentity(IAccountInfo account)
        {
            string portalIdentity = HttpContext.Current.Request.QueryString["portalIdentity"];

            // ����û��ָ���Ż���ʶ������ȡ��ǰ�û���Ĭ�Ϲ�˾ΪĬ���Ż�
            if (string.IsNullOrEmpty(portalIdentity))
            {
                if (HttpContext.Current.Request.Cookies["portalIdentity"] == null)
                {
                    MemberInfo member = (MemberInfo)MembershipManagement.Instance.MemberService[account.Id];

                    // Ĭ���Ż���ʶ
                    string defaultPortIdentity = "00000000-0000-0000-0000-000000000001";

                    if (member != null && member.Corporation != null)
                    {
                        string whereClause = string.Format(@" OrganizationId = ##{0}## AND Status = 1 ORDER BY OrderId ", member.CorporationId);

                        IList <NavigationPortalInfo> list = NavigationContext.Instance.NavigationPortalService.FindAll(whereClause);

                        HttpContext.Current.Response.Cookies.Add(new HttpCookie("portalIdentity"));
                        HttpContext.Current.Response.Cookies["portalIdentity"].Value  = list.Count > 0 ? list[0].Id : defaultPortIdentity;
                        HttpContext.Current.Response.Cookies["portalIdentity"].Domain = HttpAuthenticationCookieSetter.ParseDomain();
                    }
                    else
                    {
                        // Ĭ���Ż�
                        HttpContext.Current.Response.Cookies.Add(new HttpCookie("portalIdentity"));
                        HttpContext.Current.Response.Cookies["portalIdentity"].Value  = defaultPortIdentity;
                        HttpContext.Current.Response.Cookies["portalIdentity"].Domain = HttpAuthenticationCookieSetter.ParseDomain();
                    }
                }

                portalIdentity = HttpContext.Current.Request.Cookies["portalIdentity"].Value;
            }
            else
            {
                // �����ֹ�ָ���Ż���ʶ�������õ�ǰ�û����Ż���
                if (HttpContext.Current.Request.Cookies["portalIdentity"] == null)
                {
                    HttpContext.Current.Response.Cookies.Add(new HttpCookie("portalIdentity"));
                }

                HttpContext.Current.Response.Cookies["portalIdentity"].Value  = portalIdentity;
                HttpContext.Current.Response.Cookies["portalIdentity"].Domain = HttpAuthenticationCookieSetter.ParseDomain();
            }

            return(portalIdentity);
        }
        private string GetNavigationPortalMenu()
        {
            IList <NavigationPortalInfo> list = NavigationContext.Instance.NavigationPortalService.FindAll(" Status = 1 ORDER BY  OrderId , GroupId");

            StringBuilder outString = new StringBuilder();

            outString.Append("<div class=\"header-account-menu setting-menu-show\" style=\"display:none;\" onmouseout=\"masterpage.closeSettingMenu(event);\"> ");

            string currentGroupId = string.Empty;

            foreach (NavigationPortalInfo item in list)
            {
                if (string.IsNullOrEmpty(currentGroupId))
                {
                    currentGroupId = item.GroupId;
                }
                else if (item.GroupId != currentGroupId)
                {
                    outString.Append("<div class=\"header-account-menu-line setting-menu-show\"></div>");

                    currentGroupId = item.GroupId;
                }

                outString.Append("<div class=\"header-account-menu-item setting-menu-show\" >");
                outString.Append("<a class=\"setting-menu-show\" href=\"javascript:" + string.Format("x.cookies.add('portalIdentity','{0}',false,'/','{1}');location.href='{1}'", item.Id, item.Url, HttpAuthenticationCookieSetter.ParseDomain()) + "\" >");
                outString.Append("<span class=\"menu-text setting-menu-show\">" + item.Text + "</span>");
                outString.Append("<span class=\"menu-discption setting-menu-show\" >" + item.Description + "</span>");
                outString.Append("</a>");
                outString.Append("</div>");
            }

            outString.Append("</div>");


            return(outString.ToString());
        }