Reputation: 0 Apprentice
- New Members
- Active Posts:
- 6 (0.01 per day)
- 14-February 12
- Profile Views:
- Last Active:
- May 04 2012 06:49 AM
- Dream Kudos:
Posts I've Made
Posted 18 Feb 2012SQL Server 2008
Posted 15 Feb 2012Thanks for the reply.
Trying the code know, hope I do it correct.
Isn’t there an easier way to let the button display red if it is booked and I first only wanted to disable the button but it needs to show a popup box with the client name and surname when you hover over the button and it works but if the button is disabled the popup box doesn’t work and it still needs to display.
Thanks in advance....
Posted 14 Feb 2012To get the number associated with each button I would have each button subscribed to your btnBooking_Click event and set the tag property to the corresponding seat number. You can then cast sender as a button and read the value of the button's tag property for your insert statement. You can use a similar method to change the color of the buttons based on if they are already assigned or not.
Another thing I would look into is using parameters in your sql command string rather than concatenating values as you currently have. This is better from a security and readability standpoint.
There is one more thing if you don`t mind, if you hover over the button and it is booked I has to show the client Name and Weight (popup box) but I don`t have any idea how to let it read out of the database.
ToolTip tt = new ToolTip(); tt.Show("Meiring", this.btn1, 10000);
I have tried this and it works 100% but it displays two at the same time.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Click here to e-mail me