Web/sales.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Web
{
public partial class sales : Web.UI.BasePage
{
public int kindId = 10;
public int Id;
public Model.Customer model = new Model.Customer();
/// curpage 当前页
/// </summary>
int i, curpage, pagecount;
protected int IsShow = 1;
protected void Page_Load(object sender, EventArgs e)
{
if (!int.TryParse(Request.Params["id"] as string, out Id))
{
Server.Transfer("/error.aspx");
return;
}
BLL.Customer bll = new BLL.Customer();
if (!bll.Exists(Id))
{
Server.Transfer("/error.aspx");
return;
}
//获得当前的页数
string page = Request.Params["page"];
if (page == "" || page == null)
{
page = "1";
}
curpage = Convert.ToInt32(page);//当前页数
Pager();
model = bll.GetModel(Id);
//浏览数+1
bll.UpdateField(this.Id, "Click=Click+1");
}
/// <summary>
/// 内容分页
/// </summary>
/// <param name="_kindId"></param>
/// <returns></returns>
protected void Pager()
{
//获取页面内容
pagecount = 0;
string shtml = "";
BLL.Customer bll = new BLL.Customer();
model = bll.GetModel(this.Id);
shtml = model.Content;
string[] contentArray = model.Content.Split(new string[] { "<div>CaoYuFenYeBiaoQian</div>" }, StringSplitOptions.RemoveEmptyEntries);
int count = contentArray.Length;
IsShow = count;
//判断页面的内容长度是否大于定义的每页至少显示字符串数
for (i = 0; i < count; i++)
后面还有 50 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。