Web/petView.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ShowInfo();
}
}
//初始化
private void ShowInfo()
{
if (Request.QueryString["id"] != null)
{
PSD.BLL.products bll = new PSD.BLL.products();
DataSet ds = bll.GetList(" pid=" + Request.QueryString["id"]);
if (ds.Tables[0].Rows.Count > 0)
{
DataRow sdr = ds.Tables[0].Rows[0];
Literal1.Text = sdr["pname"].ToString();
if (sdr["pic"].ToString() != "" && sdr["pic"].ToString().Length > 3)
{
imgpic.ImageUrl = "uploads/" + sdr["pic"].ToString();
}
lblprice.Text = sdr["price"].ToString();
lblmemo.Text = sdr["memo"].ToString();
lbladdtime.Text = sdr["addtime"].ToString();
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Session["lname"] == null)
{
MessageBox.Show(this, "请先登陆!");
return;
}
shoppingcart car = new shoppingcart();
if (Session["car"] != null)
{
car = (shoppingcart)Session["car"];
}
car_class product = new car_class(Request.QueryString["id"], Literal1.Text, decimal.Parse(lblprice.Text), 1, imgpic.ImageUrl);
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。