Web/Components/CustomerListSingleC.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
namespace Maticsoft.Web.Components
{
public partial class CustomerListSingleC : System.Web.UI.Page
{
BLL.RealCustomers bll_R = new BLL.RealCustomers();
BLL.LPjieduan bll_LP = new BLL.LPjieduan();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
public void BindData()
{
DataSet ds = new DataSet();
StringBuilder strWhere = new StringBuilder();
if (txtKeyword.Text.Trim() != "")
{
#warning 代码生成警告:请修改 keywordField 为需要匹配查询的真实字段名称
//strWhere.AppendFormat("keywordField like '%{0}%'", txtKeyword.Text.Trim());
}
AspNetPager1.RecordCount = bll_R.GetRecordCount(strWhere.ToString());
ds = bll_R.GetListByPage(strWhere.ToString(), "ID", AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex);
gridView.DataSource = ds;
gridView.DataBind();
AddCheckBox();
}
private void AddCheckBox()
{
for (int i = 0; i < gridView.Rows.Count; i++)
{
string id = gridView.DataKeys[i].Value.ToString();
Label lb = (Label)gridView.Rows[i].FindControl("Label1");
string name = lb.Text;
gridView.Rows[i].Cells[0].Text = "<input id=\"radio1\" name=\"customerIDs\" type=\"radio\" onchange=\"sendVal_Customer(this,this.parentNode.parentNode,'" + id + "','" + name + "')\"/>";
}
}
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
this.BindData();
}
protected void gridView_OnRowCreated(object sender, GridViewRowEventArgs e)
{
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
