Book.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System.Data;
namespace MyWeb
{
public partial class Book : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack){
for (int i = 0; i < 30; i++)
{
DropDownList1.Items.Add(new ListItem((i+1)+"份",i.ToString()));
}
DBHelper db = new DBHelper();
TextBox3.Text = Session["name"].ToString();
string sql = "select * from Goods_Tbl where del=0 and id=" + Request["id"] + "";
DataSet ds = db.Query(sql);
Label8.Text = (Convert.ToDouble(ds.Tables[0].Rows[0]["price"]) * Convert.ToDouble("1")).ToString()+"元";
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DBHelper db = new DBHelper();
string sql = "select * from Class_Tbl where del=0 and id="+Request["id"]+"";
DataSet ds = db.Query(sql);
Label8.Text = (Convert.ToDouble(ds.Tables[0].Rows[0]["price"]) * Convert.ToDouble(DropDownList1.SelectedItem.ToString().Substring(0, DropDownList1.SelectedItem.ToString().Length-1))).ToString()+"元";
}
protected void Button1_Click(object sender, EventArgs e)
{
DBHelper db = new DBHelper();
WebHelper wb = new WebHelper();
if (TextBox1.Text=="")
{
wb.Alert("选购时间不能为空");
}
//else if (TextBox2.Text == "")
//{
// wb.Alert("送达时间不能为空");
//}
else if (TextBox3.Text == "")
{
wb.Alert("姓名不能为空");
}
else if (TextBox4.Text == "")
{
wb.Alert("手机号码不能为空");
}
//else if (TextBox5.Text == "")
//{
// wb.Alert("身份证号不能为空");
后面还有 23 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。