У меня есть календарь asp.net, который я использую как трекер времени.В настоящее время у меня есть запрос MySQL, заполняющий календарь необходимой информацией, но я не знаю, как получить эту информацию, когда выбран один из дней.Когда пользователь выбирает дату, я хочу взять информацию из даты и заполнить пару меток.Код календаря ниже.Спасибо.
If Not dsDate Is Nothing Then
For Each dr As DataRow In dsDate.Tables(0).Rows
description = CType(dr("Description"), String)
nextDate = CType(dr("Date"), DateTime)
hours = CType(dr("Hours"), Integer)
If nextDate = e.Day.Date And description = "Sick" Then
e.Cell.BackColor = System.Drawing.Color.DarkGreen
e.Cell.ToolTip = description & " - " & hours & " Hours"
ElseIf nextDate = e.Day.Date And description = "Vacation" Then
e.Cell.BackColor = System.Drawing.Color.Brown
e.Cell.ToolTip = description & " - " & hours & " Hours"
End If
Next
End If
If e.Day.IsWeekend Then
e.Cell.BackColor = System.Drawing.Color.LightSkyBlue
e.Day.IsSelectable = False
End If
If nottouched And Not e.Day.IsWeekend And Not e.Cell.BackColor = System.Drawing.Color.DarkGreen And Not e.Day.IsOtherMonth And Not e.Cell.BackColor = System.Drawing.Color.Brown Then
e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
End If