UFN_CONFLICTCHECK_CONFLICTSEXIST
Checks an event/itinerary/itinerary item for conflicts.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@START | datetime | IN | |
@END | datetime | IN | |
@LOCATIONS | xml | IN | |
@RESOURCES | xml | IN | |
@STAFFRESOURCES | xml | IN | |
@SUPERRECORDID | uniqueidentifier | IN | |
@RECORDID | uniqueidentifier | IN | |
@SUBRECORDID | uniqueidentifier | IN | |
@IGNORESUPERRECORD | bit | IN | |
@IGNORERECORD | bit | IN | |
@IGNORESUBRECORD | bit | IN | |
@IGNORERECORDSUBRECORDS | bit | IN |
Definition
Copy
create function dbo.UFN_CONFLICTCHECK_CONFLICTSEXIST
(
@START datetime,
@END datetime,
@LOCATIONS xml,
@RESOURCES xml,
@STAFFRESOURCES xml,
@SUPERRECORDID uniqueidentifier = null,
@RECORDID uniqueidentifier = null,
@SUBRECORDID uniqueidentifier = null,
@IGNORESUPERRECORD bit = 1,
@IGNORERECORD bit = 1,
@IGNORESUBRECORD bit = 1,
@IGNORERECORDSUBRECORDS bit = 1
)
returns bit
as
begin
if
(@LOCATIONS is not null and exists
(
select 1 from dbo.UFN_CONFLICTCHECK_GETLOCATIONCONFLICTS
(@START, @END, @LOCATIONS, @SUPERRECORDID, @RECORDID, @SUBRECORDID,
@IGNORESUPERRECORD, @IGNORERECORD, @IGNORESUBRECORD, @IGNORERECORDSUBRECORDS)
)
)
or
(@RESOURCES is not null and exists
(
select 1 from dbo.UFN_CONFLICTCHECK_GETRESOURCECONFLICTS
(@START, @END, @RESOURCES, null, @SUPERRECORDID, @RECORDID, @SUBRECORDID,
@IGNORESUPERRECORD, @IGNORERECORD, @IGNORESUBRECORD, @IGNORERECORDSUBRECORDS)
)
)
or
(@STAFFRESOURCES is not null and exists
(
select 1 from dbo.UFN_CONFLICTCHECK_GETSTAFFRESOURCECONFLICTS
(@START, @END, @STAFFRESOURCES, null, @SUPERRECORDID, @RECORDID, @SUBRECORDID,
@IGNORESUPERRECORD, @IGNORERECORD, @IGNORESUBRECORD, @IGNORERECORDSUBRECORDS)
)
)
return 1;
return 0;
end