Hi Guys
Currently in Events module while adding new events conflict are checked on basis on Date & Time. I would like to add one more condition to that i.e. "location". Could anybody help me to find places where all I need to do changes? I tried something which I am pasting below....
Anyhelp is appreciated and would help to solve my problem,,,
Thnx
Leena
I tried below changes in "EventController.vb" under DesktopModules\Events\Components
Public Function IsConflict(ByVal objEvent As EventInfo) As Boolean
Dim oEventEvent As EventInfo
Dim newBeginDateTime As DateTime
Dim newEndDateTime As DateTime
Dim calBeginDateTime As DateTime
Dim calEndDateTime As DateTime
Dim location As Integer
newBeginDateTime = Convert.ToDateTime(objEvent.EventDateBegin.ToShortDateString().ToString() + " " + objEvent.EventTimeBegin.TimeOfDay().ToString())
newEndDateTime = newBeginDateTime.AddMinutes(CType(objEvent.Duration, Double))
For Each oEventEvent In EventEvents
calBeginDateTime = Convert.ToDateTime(oEventEvent.EventDateBegin.ToShortDateString + " " + oEventEvent.EventTimeBegin.TimeOfDay().ToString())
calEndDateTime = calBeginDateTime.AddMinutes(CType(oEventEvent.Duration, Double))
'---**********************************leena code
If newBeginDateTime >= calBeginDateTime And newBeginDateTime <= calBeginDateTime And _
(oEventEvent.EventID <> objEvent.EventID) And (objEvent.Location = oEventEvent.Location) Then
Return True
End If
'If oEventEvent.LocationName <> objEvent.LocationName And oEventEvent.Location <> objEvent.Location Then
'Return True
'End If
'End If
Next
Return False
End Function