<% '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 Resourceid As String = Request.QueryString.Item("ResourceId") 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_resource As New ADXCalendar.Facility.Resource(database_connection_string) Dim adx_facility As New ADXCalendar.ADXFacility(database_connection_string) adx_resource.ReadFromDb(Integer.Parse(Resourceid)) Dim calendar_categorys As ADXCalendar.CalendarDatabaseActions.CalendarCategorys = New ADXCalendar.CalendarDatabaseActions.CalendarCategorys(database_connection_string) Dim calendar_subcategorys As ADXCalendar.CalendarDatabaseActions.CalendarSubCategorys = New ADXCalendar.CalendarDatabaseActions.CalendarSubCategorys(database_connection_string) 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) 'Get all textual data from the database for this event adx_event.GetEventData(Iid, False) '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 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 'EventList.aspx?eventidn=61425&view=EventDetails&information_id=25690 Response.Write("
") Response.Write("
") Response.Write("") Response.Write("") Dim resQuantity As String = "" Dim resNotes As String = "" Dim eventResources As ArrayList = adx_event.ReturnEventOccurrenceResourceItemData(Iid, False, ADXCalendar.ADXEvent.EventResourceStatus.All) For Each res As ADXCalendar.Facility.EventOccurrenceResourceItemData In eventResources If res.ResourceID = Integer.Parse(Resourceid) Then resQuantity = res.Quantity.ToString resNotes = res.Notes Exit For End If Next 'Resource specific elements 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.GetResourceBookingId(adx_event.event_idn, adx_event.event_information_id, Integer.Parse(Resourceid)) 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("") 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 & "
") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
Resource Category:" & calendar_categorys.ReturnCategoryName(adx_resource.CategoryID.ToString) & "
Resource Subcategory:" & calendar_subcategorys.ReturnSubcategoryName(adx_resource.SubCategoryID.ToString) & "
Resource:" & adx_resource.ResourceName & "
Quantity:" & resQuantity & "
Resource Notes:" & resNotes & "
") 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 'ROOM SETUP If rSetup > 0 Then Response.Write("") 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 End If 'USER SETUP Response.Write("") If uSetup > 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 eoFacility.SetupTime = eoFacility.SetupTime - uSetup Else Response.Write("") End If 'EVENT START DATE Response.Write("") Response.Write("") 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(eoFacility.TeardownTime).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("
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") & "
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 If adx_event.event_all_day = "Y" Then 'This is an all day event... Response.Write(adx_event.event_start_date.ToString("M/d/yyyy") & " All Day") Else 'This is a no time event... End If Else 'There is a start time Response.Write(adx_event.event_start_date.ToString("h:mm tt")) End If 'EVENT END DATE If adx_event.event_all_day = "N" Then Response.Write("
Event End Time:") If adx_event.event_start_date.Date = adx_event.event_end_date.Date 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")) End If Elseif 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 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("
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 & "
Booking ID: " & universalBookingId & "
") Response.Write("
") Response.Write("") Response.Write("") Response.Write("
") 'Make sure to clean up objects adx_event.DisposeADXEventClass() End If End If %>