/// <summary> /// 门户信息处理 /// </summary> /// <param name="loginuser"></param> public void PrepareMenu(UCMLCommon.ClientUserInfo loginuser) { string portalURL = string.Empty; SysDBModel.UCML_WebPage objt = new SysDBModel.UCML_WebPage(); System.Text.StringBuilder portalListStr = new System.Text.StringBuilder(); DataTable entChildMenu = UCMLCommon.UCMLUtilityFunc.GetPersonAllPortal(); string portalFormat = "<li><a href=\"#\" targetLink=\"{1}\" mtitle=\"{0}\"><span>{0}</span></a></li>"; var portalCount = entChildMenu.Rows.Count; if (portalCount > 0) { portalListStr.Append("<li class=\"dropdown-header\"><i class=\"ace-icon fa\"></i>您有" + portalCount + "个门户!</li>"); portalListStr.Append("<li class=\"dropdown-content\"><ul class=\"dropdown-menu dropdown-navbar\">"); for (int i = 0; i < entChildMenu.Rows.Count; i++) { portalURL = "BPO_AppletContainer.aspx?pageID=" + entChildMenu.Rows[i]["ID"].ToString(); portalListStr.AppendFormat(portalFormat, entChildMenu.Rows[i]["Name"].ToString(), portalURL); } portalListStr.Append("</ul></li>"); } else { portalListStr.Append("<li class=\"dropdown-header\"><i class=\"ace-icon fa\"></i>您没有门户!</li>"); } //portalListStr.Append("</ul>"); //this.Literalportal.Text = "<script type=\"text/javascript\">" + sb.ToString() + " </script> "; this.portalListCount.Text = portalCount.ToString(); this.portalList.Text = portalListStr.ToString(); }
public void PrepareMenu(UCMLCommon.ClientUserInfo loginuser) { string portalURL = string.Empty; System.Text.StringBuilder sb = new System.Text.StringBuilder(); SysDBModel.UCML_WebPage objt = new SysDBModel.UCML_WebPage(); System.Text.StringBuilder portalListStr = new System.Text.StringBuilder(); DataTable entChildMenu = UCMLCommon.UCMLUtilityFunc.GetPersonAllPortal(); portalListStr.Append("<iframe frameBorder='0' style='-moz-opacity:0; -webkit-opacity:0; opacity:0; position:absolute; visibility:inherit; top:0px; left:-15px; height:100%;width:150px; z-index:-1;background:none' ></iframe>"); portalListStr.Append("<ul ID='portalList'>"); string defPageOID = new BPO_DefaultWebPageListService().DefaultWebPageOID; for (int i = 0; i < entChildMenu.Rows.Count; i++) { portalURL = LocalResourcePath + "BPO_AppletContainer.aspx?pageID=" + entChildMenu.Rows[i]["ID"].ToString(); if (!string.IsNullOrWhiteSpace(defPageOID)) { if (defPageOID == entChildMenu.Rows[i]["UCML_WebPageOID"].ToString()) { sb.Append("\t bottomBar.addItem('home', '" + entChildMenu.Rows[i]["Name"].ToString() + "', '', 0, '" + portalURL + "', true, false);\n"); } } else if (i == 0) { sb.Append("\t bottomBar.addItem('home', '" + entChildMenu.Rows[i]["Name"].ToString() + "', '', 0, '" + portalURL + "', true, false);\n"); } portalListStr.AppendFormat("<LI title='{0}' ><A href=\"javascript:{1}\">{0}</SPAN></A></LI>", entChildMenu.Rows[i]["Name"].ToString(), "bottomBar.addItem('portal_" + entChildMenu.Rows[i]["ID"].ToString() + "', '" + entChildMenu.Rows[i]["Name"].ToString() + "', '', 0, '" + portalURL + "',true ,true)"); } portalListStr.Append("</ul>"); this.Literalportal.Text = "<script type=\"text/javascript\">" + sb.ToString() + " </script> "; this.portalList.Text = portalListStr.ToString(); }