Ahojte! Poradite mi pls, jak zjednodusit tenhle zapis? Asi je to uplne stupido, ale ja na to fakt nemuzu prijit... Potrebuju to na kazdy mesic ruzne dny a takle by to bylo dlouhy kilometr..:-/ Diky moc za pomoc;o)
Protected Sub clndrDatum_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs)
If (e.Day.Date.Month = 3 And e.Day.Date.DayOfWeek = DayOfWeek.Monday) And (e.Day.Date.Month = 3 And e.Day.Date.DayOfWeek = DayOfWeek.Tuesday) Then
e.Cell.Controls.Add(New LiteralControl(""))
End If
If (e.Day.Date.Month = 3 And e.Day.Date.DayOfWeek = DayOfWeek.Wednesday) Then
e.Cell.Controls.Clear()
End If
If (e.Day.Date.Month = 3 And e.Day.Date.DayOfWeek = DayOfWeek.Thursday) Then
e.Cell.Controls.Clear()
End If
If (e.Day.Date.Month = 3 And e.Day.Date.DayOfWeek = DayOfWeek.Friday) Then
e.Cell.Controls.Clear()
End If
If (e.Day.Date.Month = 3 And e.Day.IsWeekend) Then
e.Cell.Controls.Clear()
End If
End Sub
|