")
Response.Write("")
Response.Write("| ")
If aed.eInformationStatus = "R" Then
Response.Write("(Rescheduled) ")
ElseIf aed.eInformationStatus = "C" Then
Response.Write("(Cancelled) ")
End If
Response.Write(aed.eName)
Response.Write(" (")
Response.Write(adx_res_reader.GetResource(ADXCalendar.ADXResource.CalendarObject.QuickTip, "View") & ")")
Response.Write(" | | ")
If aed.eSchedule.event_start_date.TimeOfDay.Ticks = 0 Then
'There is no start time, hence no end time, could be all day as well
Response.Write(ADXCalendar.AdminFunctions.GetWeekdayName(CInt(aed.eSchedule.event_start_date.DayOfWeek) + 1) & ", " & ADXCalendar.AdminFunctions.GetMonthName(aed.eSchedule.event_start_date.Month) & " " & aed.eSchedule.event_start_date.ToString("dd, yyyy"))
Else
'There is a start time
Response.Write(ADXCalendar.AdminFunctions.GetWeekdayName(CInt(aed.eSchedule.event_start_date.DayOfWeek) + 1) & ", " & ADXCalendar.AdminFunctions.GetMonthName(aed.eSchedule.event_start_date.Month) & " " & aed.eSchedule.event_start_date.ToString("dd, yyyy h:mm tt"))
If aed.eSchedule.event_start_date.Date < aed.eSchedule.event_end_date And aed.eSchedule.event_end_date.TimeOfDay.Ticks = 0 Then
'MIDNIGHT EVENT...
Response.Write(" - Midnight")
ElseIf aed.eSchedule.event_start_date.Date = aed.eSchedule.event_end_date.Date Then
If aed.eSchedule.event_end_date.TimeOfDay.Ticks > 0 Then
'There is an end time
Response.Write(" - " & aed.eSchedule.event_end_date.ToString("h:mm tt"))
End If
End If
End If
Response.Write(" | | ")
Dim locationInformation As String = ""
If facList.Count > 0 Then
'THERE IS LOCATION INFORMATION FOR THIS EVENT
Dim fac As ADXCalendar.Facility.EventOccurrenceFacilityItemData = facList.Item(0)
If aed.eSchedule.location_id > 0 Then locationInformation = fac.LocationName
If aed.eSchedule.building_id > 0 Then locationInformation &= " - " & fac.BuildingName
If aed.eSchedule.room_id > 0 Then locationInformation &= " - " & fac.RoomName
If aed.eSchedule.division_id > 0 Then locationInformation &= " - " & fac.DivisionName
End If
If locationInformation <> "" Then
'Write out the location information
Response.Write(locationInformation)
Response.Write(" | | ")
End If
Response.Write(aed.eDescription)
Response.Write(" | ")
Dim Notifymeview As String = ""
Dim EmailFriendview As String = ""
Dim Outlookview As String = ""
Dim RemindMeview As String = ""
If aed.ePrivateFlag="Y" OrElse Typ = "Y" Then
Notifymeview = ADXCalendar.AdminFunctions.GetConfiguration("Notifymeview", database_connection_string, ADXCalendar.ConfigurationType.PrivateCalendar)
EmailFriendview = ADXCalendar.AdminFunctions.GetConfiguration("EmailFriendview", database_connection_string, ADXCalendar.ConfigurationType.PrivateCalendar)
Outlookview = ADXCalendar.AdminFunctions.GetConfiguration("Outlookview", database_connection_string, ADXCalendar.ConfigurationType.PrivateCalendar)
RemindMeview = ADXCalendar.AdminFunctions.GetConfiguration("RemindMeview", database_connection_string, ADXCalendar.ConfigurationType.PrivateCalendar)
Else
Notifymeview = ADXCalendar.AdminFunctions.GetConfiguration("Notifymeview", database_connection_string, ADXCalendar.ConfigurationType.PublicCalendar)
EmailFriendview = ADXCalendar.AdminFunctions.GetConfiguration("EmailFriendview", database_connection_string, ADXCalendar.ConfigurationType.PublicCalendar)
Outlookview = ADXCalendar.AdminFunctions.GetConfiguration("Outlookview", database_connection_string, ADXCalendar.ConfigurationType.PublicCalendar)
RemindMeview = ADXCalendar.AdminFunctions.GetConfiguration("RemindMeview", database_connection_string, ADXCalendar.ConfigurationType.PublicCalendar)
End if
'Create a table of icons
Response.Write("")
'If it is enabled And the event is in the future
If RemindMeview = "Enable" And aed.eSchedule.event_start_date > DateTime.Now.AddMinutes(5) And aed.eInformationStatus <> "C" Then
Response.Write("![]() | ")
End If
If Notifymeview = "Enable" And aed.eInformationStatus <> "C" Then
Response.Write("![]() | ")
End If
If Outlookview = "Enable" Then
Response.Write("![]() | ")
End If
If EmailFriendview = "Enable" Then
Response.Write("![]() | ")
End If
If aed.eRegistrationId > 0 And aed.eInformationStatus <> "C" Then
Dim adx_registration As New ADXCalendar.ADXRegistration(database_connection_string, ADXCalendar.AdminFunctions.ReturnBaseCalendarURL(Request.Url), Server.MapPath(".\"))
Dim registration As Hashtable = adx_registration.ReturnRegistrationInformation(aed.eRegistrationId.ToString())
'Registration Toggle: Based off enabled status and the number of approved registrants vs. max
If registration.Item("enabled") <> "Y" Or DateTime.Compare(DateTime.Now, aed.eSchedule.event_start_date) = 1 Then
'Registration is not enabled for this event
'or
'The current time is after the event start date, ie. the event is already past
Else
Dim showReg As Boolean = True
If registration.Item("series_registration") = "Y" Then
If registration.Item("partial_registration") = "Y" Then
'If there are still occurrences left allow registration to continue
Dim last_event_date As DateTime = adx_event_obj.GetLastEventDate(aed.eEventIdn)
If DateTime.Now > last_event_date Then showReg = False 'disable registration
Else
'If any dates have passed do not allow registration to continue
Dim first_event_date As DateTime = adx_event_obj.GetFirstEventDate(aed.eEventIdn)
If DateTime.Now > first_event_date Then showReg = False 'disable registration
End If
End If
If registration.Item("unlimited") = "Y" Then
'There is unlimited registrations
If showReg Then
Response.Write("![]() | ")
End If
Else
'Get the number of approved registrants for this class
Dim approved_registrants As Integer = registration.Item("num_approved")
If showReg AndAlso CInt(registration.Item("max_registrants")) > approved_registrants Then
'There are open "seats"
Response.Write("![]() | ")
End If
End If
End If
adx_registration.DisposeADXRegistrationClass()
Else
'There is no registration for this event
End If
Response.Write(" ")
Response.Write(" | ")
Response.Write(" ")
Response.Write(" |