Calendar Management How To's

From Pengower
Jump to: navigation, search

Want to integrate Calendars to your application? Look no further, all you need to know is here.

How to set up Calendars

Implementation doesn't have Calendar

  1. Create a new Calendar db using the provided ODL file.
  2. Replace the current Compiled Modules dll with the one provided.
  3. The "calendar" folder must be copied into the "images" folder in the relevant web folder
  4. Modify the following lines so that they contain the correct database name and database host, then add them to Global.asax
  5. After the above, follow the steps below.

Implementation already has Calendar

  1. Copy the following scripts to the application
    • Calendar
    • Return To Current Calendar off Event Deletion
    • process Display Day
    • process Display Month
    • process Return To Diary
    • save override diary settings
    • save override styles
    • save override time difference
    • save overide event
    • callChangeMonthsettings
    • process delete event
    • Rebuild Events
  2. The save override property for the following types need to be updated:
    • Diary Settings (save override diary settings)
    • Styles (save override styles)
    • Time Difference (save override time difference)
  3. Ensure the system has the following types
    • Event
    • Calendar
    • Diary
    • Styles
    • Diary Settings
    • Diary Month
    • Global Calendar
    • Global Diary Month
    • Non Working Diary
    • Time Difference
  1. Re-save the Styles object
  2. Re-save the Diary Settings object
  3. Re-save the Time Difference object
  4. Run the "Rebuild Events" script


How to Generate an HTML based day view of a Calendar

Calendar Month HTML

Args:

  • month - number: month
  • year - number: year
  • calendar - string: reference of calendar

Output: string containing html for the calendar month view

Use: Generate a html based month view of the calendar

Example:

Set args = {}
Add month To args
Add year To args
Add calendar To args
Set h = Do Run Module Params Name = "Calendar_Month_HTML", Args = args
Output = h
Return_Ok

Calendar Day HTML

Args:

  • calendar - string: reference
  • date - date: date of day to display

Output: string containing html for the calendar day view

Use: Generate a html based day view of the calendar

Example:

Set args = {}
Set calArr = Get "Calendar"
Set cale = calArr[1]
Set calendar = cale["Reference"]
Add calendar To args
Set tdy = TODAY
Set date = tdy + "0:0:0:0"
Add date To args
Set h = Do Run Module Params Name = "Calendar_Day_HTML", Args = args
Output = h
Return_Ok


How to Add a New Event to a Calendar

Args:

  • reference - string: reference of event
  • calendar - string: reference of calendar
  • staffRef - string: reference of staffmember
  • date - date: date of event
  • startTime - time: time event starts
  • endTime - time: time event ends
  • summary - string: Summary Line of event
  • details - string: more detailed description of event
  • allDay - number: flag to set event as all day
  • block - number: flag to set event as block event

Output: "Ok"

Use: Adds a new event to the database

Example:

Set args = {}
Set reference = appointment["Reference"]
Add reference To args
Set calendar = cal["Reference"]
Add calendar To args
Set staffRef = user["Staff ID"]
Add staffRef To args
Set date = appointment["Date"]
Add date To args
Set startTime = appointment["Start Time"]
Add startTime To args
Set endTime = appointment["End Time"]
Add endTime To args
Set summary = appointment["Summary"]
Add summary To args
Set details = appointment["Details"]
Add details To args
Set allDay = appointment["All Day"]
Add allDay To args
Set block = 0
Add block To args
Set ok = Do Run Module Params Name = "Calendar_Set_Event", Args = args


How to Delete an Event from a Calendar

Args:

  • reference - string: reference of event

Output: "Ok"

Use: Deletes an event from the database

Example:

Set args = {}
Set reference = event["Reference"]
Add reference To args
Set ok = Do Run Module Params Name = "Calendar_Delete_Event", Args = args


How to edit the style of a Calendar

Args:

  • topBarBg
  • topBarText
  • topBarTextHi
  • timesEdge
  • apptBg
  • apptEdgeBg
  • apptHi
  • colHeaderText
  • dayWeekendBg
  • dayWeekendText
  • dayCellText
  • DAYWEEKgridCellBg
  • DAYWEEKgridCellText
  • DAYWEEKgridCellBgHi
  • DAYWEEKgridCellTextHi
  • DAYWEEKgridEdge
  • colHeaderBg
  • colHeaderTdyBg
  • MONTHgridCellBg
  • MONTHgridCellText
  • MONTHgridCellBgFull
  • MONTHgridCellBgEmpty
  • MONTHgridEdge
  • calHeaderBg
  • calHeaderText
  • todayHiColour
  • overlapColour
  • overlapHiColour
  • STClashColour
  • STClashHiColour
  • DAYtimesWidth
  • DAYcolWidth
  • DAYpadBetCols
  • DAYtimesColWidth
  • DAYoffsetVal
  • cellH
  • cellW
  • numWordsinSum

Output: "Ok"

Use: Updates the styles for the calendar on the database

Example:

Set topBarBg = s["topBarBg"]
Add topBarBg To args
Set topBarText = s["topBarText"]
Add topBarText To args
Set topBarTextHi = s["topBarTextHi"]
Add topBarTextHi To args
Set timesEdge = s["timesEdge"]
Add timesEdge To args
Set apptBg = s["apptBg"]
Add apptBg To args
Set apptEdgeBg = s["apptEdgeBg"]
Add apptEdgeBg To args
Set apptHi = s["apptHi"]
Add apptHi To args
Set colHeaderText = s["colHeaderText"]
Add colHeaderText To args
Set dayWeekendBg = s["dayWeekendBg"]
Add dayWeekendBg To args
Set dayWeekendText = s["dayWeekendText"]
Add dayWeekendText To args
Set dayCellText = s["dayCellText"]
Add dayCellText To args
Set DAYWEEKgridCellBg = s["DAYWEEKgridCellBg"]
Add DAYWEEKgridCellBg To args
Set DAYWEEKgridCellText = s["DAYWEEKgridCellText"]
Add DAYWEEKgridCellText To args
Set DAYWEEKgridCellBgHi = s["DAYWEEKgridCellBgHi"]
Add DAYWEEKgridCellBgHi To args
Set DAYWEEKgridCellTextHi = s["DAYWEEKgridCellTextHi"]
Add DAYWEEKgridCellTextHi To args
Set DAYWEEKgridEdge = s["DAYWEEKgridEdge"]
Add DAYWEEKgridEdge To args
Set colHeaderBg = s["colHeaderBg"]
Add colHeaderBg To args
Set colHeaderTdyBg = s["colHeaderTdyBg"]
Add colHeaderTdyBg To args
Set MONTHgridCellBg = s["MONTHgridCellBg"]
Add MONTHgridCellBg To args
Set MONTHgridCellText = s["MONTHgridCellText"]
Add MONTHgridCellText To args
Set MONTHgridCellBgFull = s["MONTHgridCellBgFull"]
Add MONTHgridCellBgFull To args
Set MONTHgridCellBgEmpty = s["MONTHgridCellBgEmpty"]
Add MONTHgridCellBgEmpty To args
Set MONTHgridEdge = s["MONTHgridEdge"]
Add MONTHgridEdge To args
Set calHeaderBg = s["calHeaderBg"]
Add calHeaderBg To args
Set calHeaderText = s["calHeaderText"]
Add calHeaderText To args
Set todayHiColour = s["todayHiColour"]
Add todayHiColour To args
Set overlapColour = s["overlapColour"]
Add overlapColour To args
Set overlapHiColour = s["overlapHiColour"]
Add overlapHiColour To args
Set STClashColour = s["STClashColour"]
Add STClashColour To args
Set STClashHiColour = s["STClashHiColour"]
Add STClashHiColour To args
Set DAYtimesWidth = s["DAYtimesWidth"]
Add DAYtimesWidth To args
Set DAYcolWidth = s["DAYcolWidth"]
Add DAYcolWidth To args
Set DAYpadBetCols = s["DAYpadBetCols"]
Add DAYpadBetCols To args
Set DAYtimesColWidth = s["DAYtimesColWidth"]
Add DAYtimesColWidth To args
Set DAYoffsetVal = s["DAYoffsetVal"]
Add DAYoffsetVal To args
Set cellH = s["cellH"]
Add cellH To args
Set cellW = s["cellW"]
Add cellW To args
Set numWordsinSum = s["numWordsinSum"]
Add numWordsinSum To args
Set ok = Do Run Module Params Name = "Calendar_Set_Styles", Args = args


How to Update the Time Difference of a Calendar

Args:

  • changeSecs - number: number of seconds difference

Output: "Ok"

Use: Updates the time difference

Example:

Set td = Current_Item
Set args = {}
Set changeSecs = td["Time Difference"]
Add changeSecs To args
Set ok = Do Run Module Params Name = "Calendar_Set_Time_Difference", Args = args 


How to Set Date Range of a Calendar

To Be Updated