AddCheckIn.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace MyWeb
{
public partial class AddCheckIn : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DBHelper db = new DBHelper();
string sql = "select * from Class_Tbl where del=0 and FoodsQuantity>0";
DataSet ds = db.Query(sql);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DropDownList1.Items.Add(new ListItem(ds.Tables[0].Rows[i]["className"].ToString(), ds.Tables[0].Rows[i]["id"].ToString()));
}
sql = "select * from Goods_Tbl where del=0 and classID='" + ds.Tables[0].Rows[0]["id"] + "' and state=0";
ds = db.Query(sql);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DropDownList2.Items.Add(new ListItem(ds.Tables[0].Rows[i]["FoodsName"].ToString(), ds.Tables[0].Rows[i]["id"].ToString()));
}
DropDownList3.Items.Add(new ListItem("已预订", "1"));
}
}
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("预订时间不能为空");
}
后面还有 46 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
