Beispiel #1
0
        public string RenderHTML()
        {
            cs = Pendings.PendingsLoad();
            string nav = GlobalSettings.RelativeWebRoot + "controlpanel/controlpanel.aspx?users-pendinglist";

            StringBuilder sb    = new StringBuilder();
            int           count = cs.Count;

            if (count == 0)
            {
                sb.Append("<div class=\"empty_cl\">暂无待审核企业类型变更申请!</div>");
            }
            else
            {
                int min = Math.Min(count, _ItemCount);
                sb.Append("<ul>");
                string comName = string.Empty;
                for (int i = 0; i < min; i++)
                {
                    comName = GetCompanyName(cs[i].CompanyID);

                    sb.AppendFormat(_format,
                                    comName,
                                    GlobalSettings.SubString(comName, 20),
                                    GetCompanyType(cs[i].CompanyType)
                                    );
                }
                sb.Append("</ul>");
                if (min < count)
                {
                    sb.Append("<a class=\"clExec\" onclick=\"resolvePending('" + nav + "')\" href=\"#\" >还有<span>" + (count - min) + "</span>条待审核企业类型变更信息,马上处理!</a>");
                }
                else
                {
                    sb.Append("<a class=\"clExec\" onclick=\"resolvePending('" + nav + "')\" href=\"#\">马上处理此<span>" + count + "</span>条待审核企业类型变更信息!</a>");
                }
            }
            return(sb.ToString());
        }
 void BindPendings()
 {
     egvPendings.DataSource = Pendings.PendingsLoad();
     egvPendings.DataBind();
 }