This could take a while, So I'll move it into an answer:
1) saving the list box data to sql
2) retreving the data from sql where seat_1 of a particular table value is 1 then imageurl="...........jpg"
for all buttons
The first thing you need to do is create your Database: Have you done that? If so, what table(s) and column(s) have you defined? What types are they?
Then you need to look at how you access the database: the simplest way is to have a reader in a loop:
Using con As New SqlConnection(strConnect)
con.Open()
Using com As New SqlCommand("SELECT iD, description FROM myTable", con)
Using reader As SqlDataReader = com.ExecuteReader()
While reader.Read()
Dim id__1 As Integer = CInt(reader("iD"))
Dim desc As String = DirectCast(reader("description"), String)
Console.WriteLine("ID: {0}" & vbLf & " {1}", iD, desc)
End While
End Using
End Using
End Using
(That is only an example - it won't do what you want!)
Then you can look at saving data - but the first thing to do is sort out what data you are going to use.
"my data base structure is like this"
emp_no int
date varchar
time varchar
seat_1 bit
seat_2 bit
seat_3 bit
...
seat_50 bit
You would have to modify the SELECT statement, but to read an individual seat:
Dim seat_1 As Boolean = reader.GetBoolean(reader.GetOrdinal("seat_1"))
You can then use that bool directly to assign one of two images to the button:
buttonSeat1.Image = If(seat_1, redSeat, blueSeat)