Web/dealwith.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
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 dealwith : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["member"] == null)
{
MessageBox.ShowUrl(Page, this, "请登陆后在订购", "foods.aspx");
}
else
{
string fid = Request.QueryString["id"];
string username = (string)Session["member"];
Bll.food food = new Bll.food();
DataSet ds = food.GetfoodsList("id="+fid);
if (ds.Tables[0].Rows.Count != 0)
{
string fname = ds.Tables[0].Rows[0]["name"].ToString();
string num = "1";
string price = ds.Tables[0].Rows[0]["price"].ToString();
string allprice = ds.Tables[0].Rows[0]["price"].ToString();
Model.cart mc = new Model.cart();
mc.username = username;
mc.price = price;
mc.fname = fname;
mc.num = num;
mc.allprice = allprice;
mc.fid = fid;
Bll.cart bc = new Bll.cart();
DataSet dss = bc.GetcartList("fid=" + fid + " and username='" + username + "'");
if (dss.Tables[0].Rows.Count == 0)
{
if (bc.cartAdd(mc) == 1)
{
MessageBox.ShowUrl(Page, this, "成功加入订餐车!", "mycart.aspx");
}
}
else
{
// string allprices = Convert.ToString(int.Parse(allprice) + int.Parse(price));
string cid = dss.Tables[0].Rows[0]["id"].ToString();
string sql = "update cart set num=num+1 ,allprice= allprice +" + int.Parse(price) + " where id=" + cid;
Bll.DbHelperSQL.ExecuteSql(sql);
MessageBox.ShowUrl(Page, this, "成功加入订餐车!", "mycart.aspx");
}
}
else
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
