web/WebUserControl6.ascx.cs

(完整代码) 2KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;

public partial class web_WebUserControl6 : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void bhy(object sender, CommandEventArgs e)
    {
      //  Response.Redirect("AddRoom.aspx?Name=" + roomid);
        string[] id = e.CommandArgument.ToString().Split('|');
        string roomid = id[0];
        string lx = id[1];
        string wz=id[2];
        string bz=id[3];
        Response.Redirect("AddRoom.aspx?Name=" + roomid);

    }
    protected void bhy1(object sender, CommandEventArgs e)
    {
        //  Response.Redirect("AddRoom.aspx?Name=" + roomid);
        string[] id = e.CommandArgument.ToString().Split('|');
        string roomid = id[0];
        string lx = id[1];
        string wz = id[2];
        string bz = id[3];
        Response.Redirect("AddRoom1.aspx?Name=" + roomid);

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //string sql = "select RoomId 房间号,RCategoryId 房间类型号,Rposition 位置,Description 备注 from RoomsInfo";
        //// String sql1 = "select Cname 姓名,CustomersInfo.CidentityId 身份证,RoomId 房间号,BeginTime 开始时间,EndTime 结束时间 from Customersinfo,History where CustomersInfo.Cidentityid=History.Cidentityid  and History.BeginTime>='" + Calendar1.SelectedDate.ToString() + "' and History.BeginTime <='" + Calendar2.SelectedDate.ToString() + "' and CustomersInfo.Cname='" + TextBox3.Text.Trim() + "'";
        //string ConnStr1 = System.Configuration.ConfigurationManager.ConnectionStrings["ConnStr"].ToString();
        //SqlConnection cn = new SqlConnection(ConnStr1);
        //cn.ConnectionString = ConnStr1;
        //// String sql1 = "select Cname 姓名,CustomersInfo.CidentityId 身份证,RoomId 房间号,BeginTime 开始时间,EndTime 结束时间 from History,CustomersInfo where History.CidentityId=CustomersInfo.CidentityId";
        //cn.Open();
        //SqlCommand cmd = new SqlCommand(sql, cn);
        //GridView1.DataSource = cmd.ExecuteReader();
        //GridView1.DataBind();
        //cn.Close();
        GridView1.DataSourceID = "SqlDataSource1";
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}

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

AI 解读 AI

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

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