USP_DATAFORMTEMPLATE_EDITLOAD_RESERVATIONRATESCALEAPPLICATION
The load procedure used by the edit dataform template "Reservation Rate Scale Application 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. |
@ITEMNAME | nvarchar(100) | INOUT | Item |
@AMOUNT | money | INOUT | Amount |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_RESERVATIONRATESCALEAPPLICATION
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@ITEMNAME nvarchar(100) = null output,
@AMOUNT money = null output
)
as
set nocount on;
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@TSLONG = RESERVATIONRATESCALEAPPLICATION.TSLONG,
@AMOUNT = RESERVATIONRATESCALEAPPLICATION.AMOUNT,
@ITEMNAME = case RESERVATIONRATESCALEAPPLICATION.TYPECODE
when 0 then PROGRAM.NAME
when 1 then FEE.NAME
when 2 then RESOURCE.NAME
when 3 then VOLUNTEERTYPE.NAME
end
from dbo.RESERVATIONRATESCALEAPPLICATION
left join dbo.PROGRAM on
PROGRAM.ID = RESERVATIONRATESCALEAPPLICATION.PROGRAMID
left join dbo.FEE on
FEE.ID = RESERVATIONRATESCALEAPPLICATION.FEEID
left join dbo.RESOURCE on
RESOURCE.ID = RESERVATIONRATESCALEAPPLICATION.RESOURCEID
left join dbo.VOLUNTEERTYPE on
RESERVATIONRATESCALEAPPLICATION.VOLUNTEERTYPEID = VOLUNTEERTYPE.ID
where RESERVATIONRATESCALEAPPLICATION.ID = @ID
return 0;