USP_DATAFORMTEMPLATE_EDIT_ITINERARYITEMCUSTOMITEM_2
The save procedure used by the edit dataform template "Itinerary Item Custom Item Edit Data Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter indicating the ID of the record being edited. |
@ITINERARYID | uniqueidentifier | IN | Itinerary ID |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@NAME | nvarchar(100) | IN | Name |
@STARTDATE | date | IN | Start date |
@ENDDATE | date | IN | End date |
@STARTTIME | UDT_HOURMINUTE | IN | Start time |
@ENDTIME | UDT_HOURMINUTE | IN | End time |
@NOTES | nvarchar(500) | IN | Notes |
@LOCATIONID | uniqueidentifier | IN | Location |
@MARKLOCATIONBUSY | bit | IN | Mark location unavailable to other groups |
@RESOURCES | xml | IN | Supplies/Equipment resources |
@IGNORECONFLICTS | bit | IN | Ignore conflicts when saving |
@STAFFRESOURCES | xml | IN | Staffing resources |
@LOCATIONPRICE | money | IN | Price |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_ITINERARYITEMCUSTOMITEM_2
(
@ID uniqueidentifier,
@ITINERARYID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@NAME nvarchar(100),
@STARTDATE date,
@ENDDATE date,
@STARTTIME dbo.UDT_HOURMINUTE,
@ENDTIME dbo.UDT_HOURMINUTE,
@NOTES nvarchar(500),
@LOCATIONID uniqueidentifier,
@MARKLOCATIONBUSY bit,
@RESOURCES xml,
@IGNORECONFLICTS bit,
@STAFFRESOURCES xml,
@LOCATIONPRICE money
)
as
set nocount on;
if @ID is null
set @ID = newid()
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output
declare @CURRENTDATE datetime
set @CURRENTDATE = getdate()
begin try
exec dbo.USP_ITINERARYITEMCUSTOMITEM_EDIT
@ID,
@ITINERARYID,
@CHANGEAGENTID,
@CURRENTDATE,
@NAME,
@STARTDATE,
@ENDDATE,
@STARTTIME,
@ENDTIME,
@NOTES,
@LOCATIONID,
@MARKLOCATIONBUSY,
@RESOURCES,
@IGNORECONFLICTS,
@STAFFRESOURCES,
@LOCATIONPRICE;
end try
begin catch
exec dbo.USP_RAISE_ERROR
return 1
end catch
return 0