CheckInManage.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MyWeb
{
    public partial class CheckInManage : 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";
                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()));
                }
                DropDownList2.Items.Add(new ListItem("已预订", "1"));
                DropDownList2.Items.Add(new ListItem("已结算离店", "0"));
            }
        }
        [WebMethod]
        public static string loadCheckInManage(string pi, string ps)
        {
            DBHelper db = new DBHelper();
            //分页sql查询列表数据
            string sql = "select top " + ((Convert.ToInt32(pi) - 1) * Convert.ToInt32(ps) + Convert.ToInt32(ps)) + " * from CheckIn_Tbl a inner join Class_Tbl b on a.FoodsClassID=b.id inner join Goods_Tbl c on a.FoodsID=c.id where a.del=0 and b.del=0 and c.del=0 and a.id not in (select top " + ((Convert.ToInt32(pi) - 1) * Convert.ToInt32(ps)) + " a.id from CheckIn_Tbl a inner join Class_Tbl b on a.FoodsClassID=b.id inner join Goods_Tbl c on a.FoodsID=c.id where a.del=0 and b.del=0 and c.del=0 order by a.addDate desc) order by a.addDate desc";
            DataSet ds = db.Query(sql);
            string html = "";
            string state = "";
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (ds.Tables[0].Rows[i]["checkState"].ToString() == "1")
                {
                    state = "已预订";
                }
                else
                {
                    state = "已结算离店";
                }
                //得到列表数据
                html += "<tr><td>" + ds.Tables[0].Rows[i]["className"] + "</td><td>" + ds.Tables[0].Rows[i]["FoodsName"] + "</td><td>" + ds.Tables[0].Rows[i]["checkPrice"] + "</td><td>" + ds.Tables[0].Rows[i]["checkName"] + "</td><td>" + ds.Tables[0].Rows[i]["checkNo"] + "</td><td>" + ds.Tables[0].Rows[i]["checkTel"] + "</td><td>" + ds.Tables[0].Rows[i]["beginDate"] + "</td><td>" + ds.Tables[0].Rows[i]["endDate"] + "</td><td>" + state + "</td><td><input type='button' value='删除' class='btn' id='" + ds.Tables[0].Rows[i]["id"] + "'/></td><td><a href='EditCheckIn.aspx?id=" + ds.Tables[0].Rows[i]["id"] + "'>换房</a></td></tr>";
            }
            return html;
        }
        //删除列表信息
        [WebMethod]
        public static int RemoveCheckInManage(string id)
        {
            DBHelper db = new DBHelper();
            WebHelper wb = new WebHelper();
后面还有 57 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。