<% 'Get the database connection string from the properties file Dim database_connection_string As String = ADXCalendar.AdminFunctions.GetProperty(ADXCalendar.CalendarProperty.DataConn_ConnectionString, Server.MapPath(Request.ApplicationPath)) 'Get the base calendar url Dim base_url As String = ADXCalendar.AdminFunctions.ReturnBaseCalendarURL(Request.Url) 'This get all the event information for an event occurrence Dim Iid As String = Request.QueryString.Item("Iid") Dim hidePrivateEvent As Boolean = False If Not IsNothing(Request.QueryString.Item("private")) Then hidePrivateEvent = True End If 'This sets the language this quick tip should be output in Dim adx_res_obj As ADXCalendar.ADXResource.CalendarObject = ADXCalendar.ADXResource.CalendarObject.QuickTip Dim adx_res_reader As ADXCalendar.ADXResource.ADXResourceReader = Application("ADXResourceReader") Dim event_details_obj As Object = adx_res_reader.GetCalendarObject(ADXCalendar.ADXResource.CalendarObject.EventDetailsView) If Not IsNothing(Iid) Then If IsNumeric(Iid) Then Dim adx_event As New ADXCalendar.ADXEvent(database_connection_string) Dim adx_facility As New ADXCalendar.ADXFacility(database_connection_string) 'Get all textual data from the database for this event adx_event.GetEventData(Iid, False) Dim facilityArray As ArrayList = adx_event.event_facility_request_list Dim eoFacility As ADXCalendar.Facility.EventOccurrenceFacilityItemData = Nothing If facilityArray.Count > 0 Then 'Get and display the first one eoFacility = CType(facilityArray.Item(0), ADXCalendar.Facility.EventOccurrenceFacilityItemData) End If 'Write out some simple data to the user Response.Write("
") Response.Write("
") Response.Write("") Response.Write("") Response.Write("") 'Response.Write("") Dim calendar_departments As New ADXCalendar.CalendarDatabaseActions.CalendarDepartments(database_connection_string) Dim adx_booking As New ADXCalendar.ADXBooking(database_connection_string) Dim reservationId As String = adx_booking.GetReservationId(adx_event.event_idn) Dim universalBookingId As String = adx_booking.GetFacilityBookingId(adx_event.event_idn, eoFacility.InformationID, eoFacility.LocationID, eoFacility.BuildingID, eoFacility.RoomID) If eoFacility.FacilityApproval.Trim = "" Then reservationId = "N/A" universalBookingId = "N/A" End If Dim full_name As String = "" If adx_event.event_created_by > 0 Then 'This event was created by a standard calendar user... Dim calendar_login As New ADXCalendar.ADXCalendarLogin(adx_event.event_created_by, database_connection_string) full_name = calendar_login.GetLastName() & ", " & calendar_login.GetFirstName() Else 'This event was created by an open entry user... Dim oeutilityform As New ADXCalendar.openentrymoduleutility full_name = oeutilityform.GetOpenEntrySubmitterName(adx_event.event_idn.ToString(), Session("DataConn_ConnectionString")) oeutilityform.Dispose() End If Response.Write("") Response.Write("") Response.Write("
") If hidePrivateEvent = False Then If adx_event.event_information_status = "R" Then Response.Write("(Rescheduled) ") ElseIf adx_event.event_information_status = "C" Then Response.Write("(Cancelled) ") End If Response.Write(adx_event.event_name) If (Not Request.UrlReferrer.ToString.IndexOf("/pendingeventdetails.aspx") >= 0) And (Not Request.UrlReferrer.ToString.IndexOf("/eventschedulefacility.aspx") >= 0) Then 'Do not show this on the pending view... Response.Write(" (") Response.Write("View)") End If Else Response.Write("Private Event") End If Response.Write("
") Response.Write("") 'event name Response.Write("") If hidePrivateEvent = False Then Response.Write("") Else Response.Write("") End If 'event type Dim eventType As String = "Facility" If adx_event.event_private_flag = "N" Then eventType = "Public" End If If adx_event.event_private_flag = "Y" Then eventType = "Private" End If Response.Write("") Response.Write("") Response.Write("
Event Name:" & adx_event.event_name & "
Private Event
Event Type:" & eventType & "
") If Not IsNothing(eoFacility) Then If eoFacility.RoomSetupTypeID > 0 Then 'room setup Response.Write("") Response.Write("") End If If eoFacility.Capacity > 0 Then 'setup count Response.Write("") Response.Write("") End If End If 'USER TIMES/REQUIRED TIMES Dim uSetup As Integer = 0 : Dim uTear As Integer = 0 Dim rSetup As Integer = 0 : Dim rTear As Integer = 0 adx_facility.GetUserRoomSetupTimes(Integer.Parse(Iid), uSetup, uTear, rSetup, rTear) 'uSetup and uTear passed by ref 'Fix the all day status for events with no time If adx_event.event_start_date.TimeOfDay.Ticks = 0 and adx_event.event_end_date.TimeOfDay.Ticks = 0 Then adx_event.event_all_day = "Y" End If 'ROOM SETUP Response.Write("") If rSetup > 0 Then If adx_event.event_start_date.AddMinutes(-eoFacility.SetupTime).Date <> adx_event.event_start_date.Date Then 'These start date is different than the setup date... Response.Write("") Else 'The start date is the same as the setup date... Response.Write("") End If Else Response.Write("") End If 'USER SETUP Response.Write("") If uSetup > 0 Then If adx_event.event_start_date.AddMinutes(-uSetup).Date <> adx_event.event_start_date.Date Then 'These start date is different than the setup date... Response.Write("") Else 'The start date is the same as the setup date... Response.Write("") End If eoFacility.SetupTime = eoFacility.SetupTime - uSetup Else Response.Write("") End If 'EVENT START DATE Response.Write("") Response.Write("") Else 'There is a start time Response.Write(adx_event.event_start_date.ToString("h:mm tt") & "") End If 'EVENT END TIME If adx_event.event_start_date.TimeOfDay.Ticks > 0 Then Response.Write("") Response.Write("") End If End If End If IF adx_event.event_start_date.Date < adx_event.event_end_date.Date And adx_event.event_end_date.TimeOfDay.Ticks = 0 Then 'The end date is after the start date and there is no end time Response.Write("Midnight") End If 'ADJUST THE END DATE FOR TEARDOWN DISPLAY PURPOSES ONLY Dim teardownEDate As DateTime = adx_event.event_end_date If adx_event.event_all_day = "Y" Then teardownEDate = adx_event.event_end_date.AddDays(1) 'USER TEARDOWN Response.Write("") If uTear > 0 Then If teardownEDate.AddMinutes(uTear).Date <> adx_event.event_start_date.Date Then 'These start date is different than the setup date... Response.Write("") Else 'The start date is the same as the setup date... Response.Write("") End If Else Response.Write("") End If 'ROOM TEARDOWN Response.Write("") If rTear > 0 Then If teardownEDate.AddMinutes(rTear).Date <> adx_event.event_start_date.Date Then 'These start date is different than the setup date... Response.Write("") Else 'The start date is the same as the setup date... Response.Write("") End If Else Response.Write("") End If 'Response.Write("") Response.Write("
Room Setup Option:" & eoFacility.RoomSetupTypeName & "
Setup Count:" & eoFacility.Capacity.ToString & "
Room Setup:" & adx_event.event_start_date.AddMinutes(-eoFacility.SetupTime).ToString("M/d/yyyy h:mm tt") & "
" & adx_event.event_start_date.AddMinutes(-eoFacility.SetupTime).ToString("h:mm tt") & "
N/A
User Setup:" & adx_event.event_start_date.AddMinutes(-uSetup).ToString("M/d/yyyy h:mm tt") & "
" & adx_event.event_start_date.AddMinutes(-uSetup).ToString("h:mm tt") & "
N/A
Event Start Time:") If adx_event.event_start_date.TimeOfDay.Ticks = 0 Then 'Must be an all day event Response.Write(adx_event.event_start_date.ToString("M/d/yyyy") & " All Day
Event End Time:") If DateTime.Compare(adx_event.event_start_date.Date, adx_event.event_end_date.Date) = 0 Then If adx_event.event_end_date.TimeOfDay.Ticks > 0 Then 'There is an end time Response.Write(adx_event.event_end_date.ToString("h:mm tt") & "
User Tear Down:" & teardownEDate.AddMinutes(uTear).ToString("M/d/yyyy h:mm tt") & "
" & teardownEDate.AddMinutes(uTear).ToString("h:mm tt") & "
N/A
Room Tear Down:" & teardownEDate.AddMinutes(eoFacility.TeardownTime).ToString("M/d/yyyy h:mm tt") & "
" & teardownEDate.AddMinutes(eoFacility.TeardownTime).ToString("h:mm tt") & "
N/A
") 'Response.Write("
") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
Event Owner:" & full_name & "
Department:" & calendar_departments.ReturnDepartmentName(adx_event.event_department_id) & "
Reservation ID: " & reservationId & "
Booking ID: " & universalBookingId & "
") Response.Write("
") Response.Write("") Response.Write("") Response.Write("
") adx_event.DisposeADXEventClass() 'Make sure to clean up objects End If End If %>