home *** CD-ROM | disk | FTP | other *** search
Null Bytes Alternating | 1995-11-10 | 4.5 KB | 74 lines |
- '++LotusScript Development Environment:2:5:(Options):0:66
-
- '++LotusScript Development Environment:2:5:(Forward):0:1
- Declare Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
-
- '++LotusScript Development Environment:2:5:(Declarations):0:2
-
- '++LotusScript Development Environment:2:2:BindEvents:1:129
- Private Sub BindEvents(Byval Objectname_ As String)
- Static Source As BUTTON
- Set Source = Bind(Objectname_)
- On Event Click From Source Call Click
- End Sub
-
- '++LotusScript Development Environment:2:2:Click:1:12
- Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
- Dim d As String
- Dim txt As String
- Dim st As String
- Dim ft As String
- Dim roomID As Integer
- Dim roomName As String
- Dim start As Double
- Dim finish As Double
- Dim note As String
- Dim OK As Integer
- Dim msg As String
-
- OK = False
- d = source.fbxDate.text
- txt = source.fbxReservedBy.text
- st = source.ddbStart.text
- ft = source.ddbEnd.text
- roomName = source.ddbRoom.text
- note = source.fbxNotes.text
- If (txt <>"") And (d <> "") And (roomName <> "") And (st <> "") And (ft <> "")Then
- OK = True
- Else
- OK = False
- Messagebox "Invalid request. Be sure the entire reservation form is complete."
- End If
-
- If OK Then
- start = Timevalue(Trim(source.ddbStart.text)) * 24
- finish = Timevalue(Trim(source.ddbEnd.text)) * 24
- If start < finish Then
- Select Case source.text
- Case "Reserve"
- If modifySchedule(d, roomName, txt, start, finish, note, 1) Then
- currentwindow.close
- clearDisplay
- readBlock d
- currentview.body.fbxDateDisplay.text = d
- Else
- msg = "Room " + roomName + " is not available from " +source.ddbStart.text+" to " + source.ddbEnd.text + " on " + d + "."
- Messagebox msg, 0,"Schedule Conflict"
- End If
- Case "Remove"
- If modifySchedule(d, roomName, "", start, finish, "", -1) Then
- currentwindow.close
- clearDisplay
- readBlock d
- currentview.body.fbxDateDisplay.text = d
- Else
- msg = "Room " + roomName + " is not scheduled from " + source.ddbStart.text+" to " + source.ddbEnd.text + " on " + d + "."
- Messagebox msg, 0, "Room Not Scheduled"
- End If
- End Select
- Else
- msg = "End time must be greater than Start time."
- Messagebox msg , 0, "Invalid Times Entered"
- End If
- End If
- End Sub