//Functionality to Set Room Reservation protected void gvtwo_RowCommand(object sender, GridViewCommandEventArgs e) { switch (((Button)e.CommandSource).CommandName) { case "Reserve": String s = e.CommandArgument.ToString(); int RoomID; int.TryParse(s, out RoomID); QMRServiceReference.qmrserviceSoapClient client = new QMRServiceReference.qmrserviceSoapClient(); client.ReserveRoom(RoomID, true); gvtwo.DataSource = client.GetListRooms(); gvtwo.DataBind(); Label1.Text = RoomID.ToString(); break; default: break; } }
public override string ToString() { return(RoomID.ToString() + " " + Occupied.ToString()); }