product/fenye4.ascx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class news_fenye : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
int iPageSize = 1;
string strTableName = "Product";
string strKey = "ProductId";
string strORDER = "DESC";
int Id = Convert.ToInt32(Request.QueryString["Id"]);
string strFilelds = "*";
int iCurPage;
int iMaxPage = 1;
string sql = "";
string sqlstr = "SELECT count(*) FROM " + strTableName + " where TypeId=" + Id;
if (Request.QueryString["page"] != "")
iCurPage = Convert.ToInt32(Request.QueryString["Page"]);
else
iCurPage = 1;
int intTotalRec = Convert.ToInt32(MyClass.ExecuteScalar(sqlstr));
if (intTotalRec % iPageSize == 0)
iMaxPage = intTotalRec / iPageSize;
else
iMaxPage = intTotalRec / iPageSize + 1;
if (iMaxPage == 0) iMaxPage = 1;
if (iCurPage < 1) iCurPage = 1;
else
if (iCurPage > iMaxPage) iCurPage = iMaxPage;
if (intTotalRec != 0)
{
if (iCurPage == 1)
sql = "SELECT top " + iPageSize + " " + strFilelds + " FROM " + strTableName + " where TypeId = " + Id + " ORDER BY " + strKey + " " + strORDER;
else
sql = "SELECT top " + iPageSize + " " + strFilelds + " FROM " + strTableName + " WHERE " + strKey + " not in (SELECT top " + (iCurPage - 1) * iPageSize + " " + strKey + " FROM " + strTableName + " where TypeId = ' " + Id + " ' ORDER BY " + strKey + " " + strORDER + ") and TypeId = ' " + Id + " ' ORDER BY " + strKey + " " + strORDER;
}
DataList1.DataSource = MyClass.OfflineSelect(sql);
DataList1.DataBind();
lblTotal.Text = "共有" + intTotalRec.ToString() + "条记录 当前是第" + iCurPage.ToString() + "/" + iMaxPage.ToString() + "页 ";
if (iCurPage != 1)
{
hlFirst.NavigateUrl = Request.FilePath + "?page=1&Id=" + Id;
hlPre.NavigateUrl = Request.FilePath + "?page=" + (iCurPage - 1) + "&Id=" + Id;
}
if (iCurPage != iMaxPage)
后面还有 34 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。