Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

65 lines
1.9KB

  1. <%
  2. Class TodayController_Class
  3. Private m_useLayout
  4. Private m_title
  5. Private Sub Class_Initialize()
  6. m_useLayout = True
  7. m_title = "Today"
  8. End Sub
  9. Public Property Get useLayout
  10. useLayout = m_useLayout
  11. End Property
  12. Public Property Let useLayout(v)
  13. m_useLayout = v
  14. End Property
  15. Public Property Get Title
  16. Title = m_title
  17. End Property
  18. Public Property Let Title(v)
  19. m_title = v
  20. End Property
  21. '-------------------------------------------------------------------------------------------------------------------
  22. ' GET /today : follow-ups that are overdue, due today, and coming up this week
  23. '-------------------------------------------------------------------------------------------------------------------
  24. Public Sub index()
  25. Const LOOKAHEAD_DAYS = 7
  26. Dim all, i, r, nextDate, overdue, dueToday, upcoming
  27. Set all = BusinessRepository().DueThrough(Date + LOOKAHEAD_DAYS)
  28. Set overdue = CreateObject("Scripting.Dictionary")
  29. Set dueToday = CreateObject("Scripting.Dictionary")
  30. Set upcoming = CreateObject("Scripting.Dictionary")
  31. For i = 0 To all.Count - 1
  32. Set r = all(i)
  33. nextDate = CDate(r("next_action_date"))
  34. If nextDate < Date Then
  35. overdue.Add overdue.Count, r
  36. ElseIf nextDate = Date Then
  37. dueToday.Add dueToday.Count, r
  38. Else
  39. upcoming.Add upcoming.Count, r
  40. End If
  41. Next
  42. %>
  43. <!--#include file="../views/Today/index.asp" -->
  44. <%
  45. End Sub
  46. End Class
  47. Dim TodayController_Class__Singleton
  48. Function TodayController()
  49. If IsEmpty(TodayController_Class__Singleton) Then
  50. Set TodayController_Class__Singleton = New TodayController_Class
  51. End If
  52. Set TodayController = TodayController_Class__Singleton
  53. End Function
  54. %>

Powered by TurnKey Linux.