System/Sys_Product_List.aspx.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class System_Sys_Product_List : System.Web.UI.Page
{
protected string con = CommonLib.SqlHelper.SqlConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//CommonLib.SqlHelper.islogin(Page);
try
{
int id = Convert.ToInt32(Request.QueryString["cls"]);
if (id == 2)
{
GridView1.Columns[3].Visible = false;
}
}
catch { CommonLib.JavaScriptHelper.AlertAndRedirect("参数错误!", "sys_product_list.aspx?cls=1", Page); }
Bind();
}
}
#region 绑定
private void Bind()
{
string count = "";
string sql = "";
if (Request.QueryString["cls"] != null)
{
count = "select count(*) from product where pro_type=3";
}
else
{
count = "select count(*) from product";
}
if (Request.QueryString["cls"] != null)
{
sql = "select * from product where pro_type=3 order by pro_id desc";
}
else
{
sql = "select * from product order by pro_id desc";
}
AspNetPager1.RecordCount = Convert.ToInt32(CommonLib.SqlHelper.ExecuteScalar(con, CommandType.Text, count, null));
CommonLib.SqlHelper.BindGridView(GridView1, sql, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex - 1);
if (AspNetPager1.RecordCount > 0)
后面还有 127 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。