USP_DATAFORMTEMPLATE_VIEW_BATCHEVENTDESIGNATION
The load procedure used by the view dataform template "Batch Event Designation View"
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. |
@BASECURRENCYID | uniqueidentifier | INOUT | BASECURRENCYID |
@HASDESIGNATIONS | bit | INOUT | HASDESIGNATIONS |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_VIEW_BATCHEVENTDESIGNATION(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@BASECURRENCYID uniqueidentifier = null output,
@HASDESIGNATIONS bit = null output
)
as
set nocount on;
select
@DATALOADED = 1,
@BASECURRENCYID = EVENT.BASECURRENCYID
from dbo.EVENT
where EVENT.ID = @ID
if @DATALOADED = 1
begin
if exists(
select ID
from dbo.EVENTDESIGNATION
where EVENTDESIGNATION.EVENTID = @ID
)
begin
set @HASDESIGNATIONS = 1
end
else
begin
set @HASDESIGNATIONS = 0
end
end