myBook.Web/Cart.aspx.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using myBook.BLL;
using myBook.Model;
using System.Data;
public partial class Cart : System.Web.UI.Page
{
cartBLL cbll = new cartBLL();
orderBLL obll = new orderBLL();
orderDetailBLL odbll = new orderDetailBLL();
protected void Page_Load(object sender, EventArgs e)
{
common.checkIndexLogin("Login.aspx");
if (!IsPostBack)
{
this.BindCart();
}
}
/// <summary>
/// 绑定购物车
/// </summary>
private void BindCart()
{
string strWhere = " ispay=0 and userid=" + loginSession.loginInfo.session().Id;
int pageIndex = this.hfPageIndex.Value != "" ? int.Parse(this.hfPageIndex.Value) : 1;
int rowCount = cbll.GetRecordCount(strWhere);
int pageSize = int.Parse(this.hfPageSize.Value);
int pageCount = (rowCount - 1) / pageSize + 1;
this.hfPageCount.Value = pageCount.ToString();
int startIndex = this.hfStartIndex.Value != "" ? int.Parse(this.hfStartIndex.Value) : 1;//开始条数
int endIndex = this.hfEndIndex.Value != "" ? int.Parse(this.hfEndIndex.Value) : pageSize;//结束条数
DataTable dt = cbll.GetListByPage(strWhere, "", startIndex, endIndex).Tables[0];
double sum = 0;
foreach (DataRow row in dt.Rows)
{
sum += double.Parse(row["sumPrice"].ToString());
}
后面还有 120 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
