EditCheckIn.aspx.cs
(开头部分) 6KB这里只显示每个文件的开头 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 EditCheckIn : 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"));
DropDownList3.Items.Add(new ListItem("已结算离店", "0"));
sql = "select * from CheckIn_Tbl where del=0 and id='" + Request["id"].ToString() + "'";
ds = db.Query(sql);
if (ds.Tables[0].Rows.Count > 0)
{
TextBox1.Text = ds.Tables[0].Rows[0]["checkPrice"].ToString();
TextBox2.Text = ds.Tables[0].Rows[0]["checkName"].ToString();
TextBox3.Text = ds.Tables[0].Rows[0]["checkNo"].ToString();
TextBox4.Text = ds.Tables[0].Rows[0]["checkTel"].ToString();
TextBox5.Text = ds.Tables[0].Rows[0]["beginDate"].ToString().Substring(0,10);
TextBox6.Text = ds.Tables[0].Rows[0]["endDate"].ToString().Substring(0, 10);
}
}
}
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("选购人姓名不能为空");
}
后面还有 66 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
