void BindCorps() { string name = Request.QueryString["CorpName"]; if (!string.IsNullOrEmpty(name)) { txtCompanyName.Text = name; } egvCorps.DataSource = Companys.GetCompanys(GetComStatus(), CompanyType.None, txtCompanyName.Text.Trim()); egvCorps.DataBind(); }
public string RenderHTML() { List <Company> cs = Companys.GetCompanys(CompanyStatus.ApprovalPending, CompanyType.None, string.Empty); string nav = GlobalSettings.RelativeWebRoot + "controlpanel/controlpanel.aspx?users-corps&des=authpre"; StringBuilder sb = new StringBuilder(); int count = cs.Count; if (count == 0) { sb.Append("<div class=\"empty_cl\">暂无待审核企业信息!</div>"); } else { string _url = string.Empty; int min = Math.Min(count, _ItemCount); sb.Append("<ul>"); for (int i = 0; i < min; i++) { _url = cs[i].Website; sb.AppendFormat(_format, GlobalSettings.SubString(cs[i].CompanyName, 20), cs[i].CompanyName, !string.IsNullOrEmpty(_url) ? "<a href=\"" + _url + "\" target=\"_blank\">" + GlobalSettings.SubString(_url, 20) + "</a>" : "--" ); } sb.Append("</ul>"); if (min < count) { sb.Append("<a class=\"clExec\" onclick=\"resolvePendingCompany('" + nav + "')\" href=\"#\" >还有<span>" + (count - min) + "</span>条待审核企业信息,马上处理!</a>"); } else { sb.Append("<a class=\"clExec\" onclick=\"resolvePendingCompany('" + nav + "')\" href=\"#\">马上处理此<span>" + count + "</span>条待审核企业信息!</a>"); } } return(sb.ToString()); }
protected void btnSearch_Click(object obj, EventArgs e) { egvCorps.DataSource = Companys.GetCompanys(GetComStatus(), CompanyType.None, txtCompanyName.Text.Trim()); egvCorps.DataBind(); }