USP_DATAFORMTEMPLATE_ADD_EVENT
The save procedure used by the add dataform template "Event Add Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | INOUT | The output parameter indicating the ID of the record added. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@NAME | nvarchar(100) | IN | Name |
@DESCRIPTION | nvarchar(255) | IN | Description |
@STARTDATE | date | IN | Start date |
@STARTTIME | UDT_HOURMINUTE | IN | Start time |
@ENDDATE | date | IN | End date |
@ENDTIME | UDT_HOURMINUTE | IN | End time |
@CAPACITY | int | IN | Capacity |
@EVENTLOCATIONID | uniqueidentifier | IN | Location |
@EVENTLOCATIONCONTACTID | uniqueidentifier | IN | Contact |
@MAINEVENTID | uniqueidentifier | IN | Main event |
@COPYFROMEVENTID | uniqueidentifier | IN | Copy from |
@COPYTASKS | bit | IN | Copy tasks |
@COPYEXPENSES | bit | IN | Copy expenses |
@COPYPRICES | bit | IN | Copy registration options |
@COPYINVITATIONS | bit | IN | Copy invitations |
@COPYINVITEES | bit | IN | Copy invitees |
@COPYATTRIBUTES | bit | IN | Copy attributes |
@ATTRIBUTEDEFINED | bit | IN | Event attributes defined |
@SITES | xml | IN | Sites |
@COPYPREFERENCES | bit | IN | Copy preferences |
@EVENTCATEGORYCODEID | uniqueidentifier | IN | Category |
@COPYTEAMSTRUCTURE | bit | IN | Copy team structure |
@COPYTEAMFUNDRAISERS | bit | IN | Copy team members |
@APPEALID | uniqueidentifier | IN | Appeal |
@ADDQUICKCOMPARE | bit | IN | Allow quick comparisons with original event |
@COPYLODGINGOPTIONS | bit | IN | Copy lodging options |
@EVENTLOCATIONROOMID | uniqueidentifier | IN | Room/Unit |
@COPYJOBOCCURRENCES | bit | IN | Copy job occurrences |
@ISAUCTION | bit | IN | Event is an auction |
@HIDEFROMCALENDAR | bit | IN | Do not show event on calendar |
@DESIGNATIONSONFEES | bit | IN | Event allows designations on fees |
@COPYDESIGNATIONS | bit | IN | Copy designations |
@COPYPUBLICDESCRIPTION | bit | IN |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_EVENT
(
@ID uniqueidentifier = null output,
@CURRENTAPPUSERID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@NAME nvarchar(100) = '',
@DESCRIPTION nvarchar(255) = '',
@STARTDATE date,
@STARTTIME dbo.UDT_HOURMINUTE = null,
@ENDDATE date = null,
@ENDTIME dbo.UDT_HOURMINUTE = null,
@CAPACITY int = 0,
@EVENTLOCATIONID uniqueidentifier = null,
@EVENTLOCATIONCONTACTID uniqueidentifier = null,
@MAINEVENTID uniqueidentifier = null,
@COPYFROMEVENTID uniqueidentifier = null,
@COPYTASKS bit = 1,
@COPYEXPENSES bit = 1,
@COPYPRICES bit = 1,
@COPYINVITATIONS bit = 1,
@COPYINVITEES bit = 1,
@COPYATTRIBUTES bit = 1,
@ATTRIBUTEDEFINED bit = 0,
@SITES xml = null,
@COPYPREFERENCES bit = 1,
@EVENTCATEGORYCODEID uniqueidentifier = null,
@COPYTEAMSTRUCTURE bit = 0,
@COPYTEAMFUNDRAISERS bit = 0,
@APPEALID uniqueidentifier = null,
@ADDQUICKCOMPARE bit = 1,
@COPYLODGINGOPTIONS bit = 1,
@EVENTLOCATIONROOMID uniqueidentifier = null,
@COPYJOBOCCURRENCES bit = 1,
@ISAUCTION bit = 0,
@HIDEFROMCALENDAR bit = 0,
@DESIGNATIONSONFEES bit = 0,
@COPYDESIGNATIONS bit = 1,
@COPYPUBLICDESCRIPTION bit = 1
-- pdg 8.27.2009 removing EVENTTYPEID while FAF is under construction ,@EVENTTYPEID tinyint = 0
)
as
set nocount on;
begin try
--AdamBu 1/5/10 - Created a new SP to do the adding so that it can be shared with Event Batch Commit.
-- Adding to a hierarchy must now be done from the event summary page or the hierarchy tab
set @MAINEVENTID = null;
exec dbo.USP_EVENT_ADD
@ID = @ID output,
@CURRENTAPPUSERID = @CURRENTAPPUSERID,
@CHANGEAGENTID = @CHANGEAGENTID,
@NAME = @NAME,
@DESCRIPTION = @DESCRIPTION,
@STARTDATE = @STARTDATE,
@STARTTIME = @STARTTIME,
@ENDDATE = @ENDDATE,
@ENDTIME = @ENDTIME,
@CAPACITY = @CAPACITY,
@EVENTLOCATIONID = @EVENTLOCATIONID,
@EVENTLOCATIONCONTACTID = @EVENTLOCATIONCONTACTID,
@MAINEVENTID = @MAINEVENTID,
@COPYFROMEVENTID = @COPYFROMEVENTID,
@COPYTASKS = @COPYTASKS,
@COPYEXPENSES = @COPYEXPENSES,
@COPYPRICES = @COPYPRICES,
@COPYINVITATIONS = @COPYINVITATIONS,
@COPYINVITEES = @COPYINVITEES,
@COPYATTRIBUTES = @COPYATTRIBUTES,
@ATTRIBUTEDEFINED = @ATTRIBUTEDEFINED,
@SITES = @SITES,
@COPYPREFERENCES = @COPYPREFERENCES,
@EVENTCATEGORYCODEID = @EVENTCATEGORYCODEID,
@COPYTEAMSTRUCTURE = @COPYTEAMSTRUCTURE,
@COPYTEAMFUNDRAISERS = @COPYTEAMFUNDRAISERS,
@APPEALID = @APPEALID,
@ADDQUICKCOMPARE = @ADDQUICKCOMPARE,
@COPYLODGINGOPTIONS = @COPYLODGINGOPTIONS,
@EVENTLOCATIONROOMID = @EVENTLOCATIONROOMID,
@COPYJOBOCCURRENCES = @COPYJOBOCCURRENCES,
@ISAUCTION = @ISAUCTION,
@HIDEFROMCALENDAR = @HIDEFROMCALENDAR,
@DESIGNATIONSONFEES = @DESIGNATIONSONFEES,
@COPYDESIGNATIONS = @COPYDESIGNATIONS,
--,
--@EVENTTYPEID = @EVENTTYPEID,
@COPYPUBLICDESCRIPTION = @COPYPUBLICDESCRIPTION;
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;