📄 selectcw.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Admin_SelectCw : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// 显示车位管理信息
this.GridView1.DataSource = DataControl.GetData("select * from 车位管理 where 车位类别='固定车位' and 车位代码 not in (select 车位代码 from 分配车位)");
this.GridView1.DataBind();
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
string idKey = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)]["车位代码"].ToString();
if (e.CommandName == "Sel")
{
//将选择的车位代码返回到调用它页面的指定控件中
Response.Write("<script>window.opener.document.getElementById('Hidden1').value ='" + idKey + "';window.opener.document.getElementById('Textbox1').value ='" + this.GridView1.Rows[Convert.ToInt32(e.CommandArgument)].Cells[2].Text.ToString() + "';window.close();</script>");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -