USP_DATAFORMTEMPLATE_EDITLOAD_UPDATEEVENTATTENDANCE

The load procedure used by the edit dataform template "Update Event Attendance Edit Data Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@TSLONG bigint INOUT Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record.
@ISPROCESSED bit INOUT
@ATTENDEDOPTION tinyint INOUT Update all registrants whose attendance is unspecified to
@HASEVENTMANAGEMENTOPTIONS bit INOUT
@INCLUDESUBEVENTS int INOUT Update

Definition

Copy


          CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_UPDATEEVENTATTENDANCE(
              @ID uniqueidentifier,
              @DATALOADED bit = 0 output,
              @TSLONG bigint = 0 output,
              @ISPROCESSED bit = null output,
              @ATTENDEDOPTION tinyint = null output,
              @HASEVENTMANAGEMENTOPTIONS bit = null output,
              @INCLUDESUBEVENTS integer = null output
          )
          as

              set nocount on;

              -- be sure to set these, in case the select returns no rows

              set @DATALOADED = 0
              set @TSLONG = 0

              select
                  @DATALOADED = 1,
                  @TSLONG = EVENT.TSLONG,
              @ISPROCESSED = EVENT.ISPROCESSED,
              @HASEVENTMANAGEMENTOPTIONS =  case when EVENTMANAGEMENTOPTIONS.ID is null then 0 else 1 end
              from dbo.EVENT
            left join dbo.EVENTMANAGEMENTOPTIONS on EVENTMANAGEMENTOPTIONS.EVENTID = EVENT.ID
              where EVENT.ID = @ID

            set @ATTENDEDOPTION = 0;
            set @INCLUDESUBEVENTS = 0;

              return 0;