protected void DropDownListIndex_OnChanged(object sender, EventArgs e) { ExtendBLL.Location location = new ExtendBLL.Location(); DataSet ds = new DataSet(); int LabID = 0; if (LabDDL.SelectedValue != "0") { LabID = int.Parse(LabDDL.SelectedValue); } ds = location.GetRoomInfo(LabID, LocationNameTBX.Text, CampusTBX.Text, BuildingNameTBX.Text, FloorTBX.Text, RoomNumTBX.Text); LabRoomGridView.DataSource = ds; LabRoomGridView.DataBind(); }
//绑定LabRoomGridView protected void LabRoom_BindData(int LabID, string LocalName, string Campus, string BuildingName, string Floor, string RoomNum) { ExtendBLL.Location lc = new ExtendBLL.Location(); DataSet ds = new DataSet(); ds = lc.GetRoomInfo(LabID, LocalName, Campus, BuildingName, Floor, RoomNum); LabRoomGridView.DataSource = ds; LabRoomGridView.DataBind(); }