USP_DATAFORMTEMPLATE_EDITLOAD_EVENTPRICE_2
The load procedure used by the edit dataform template "Registration Option Edit Form 2"
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. |
@EVENTREGISTRATIONTYPE | nvarchar(100) | INOUT | Registration type |
@AMOUNT | money | INOUT | Registration fee |
@RECEIPTAMOUNT | money | INOUT | Receipt amount |
@BENEFIT | xml | INOUT | Benefits |
@COST | money | INOUT | Cost |
@NAME | nvarchar(100) | INOUT | Name |
@REGISTRATIONCOUNT | int | INOUT | Registration count |
@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. |
@BASECURRENCYID | uniqueidentifier | INOUT | Base currency ID |
@EVENTBASECURRENCYDECIMALDIGITS | tinyint | INOUT | Event base currency decimal digits |
@EVENTBASECURRENCYROUNDINGTYPECODE | tinyint | INOUT | Event base currency rounding type code |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_EVENTPRICE_2
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@EVENTREGISTRATIONTYPE nvarchar(100) = null output,
@AMOUNT money = null output,
@RECEIPTAMOUNT money = null output,
@BENEFIT xml = null output,
@COST money = null output,
@NAME nvarchar(100) = null output,
@REGISTRATIONCOUNT int = null output,
--@DESIGNATION xml = null output,
--@DESIGNATIONAMOUNT money = null output,
@TSLONG bigint = 0 output,
@BASECURRENCYID uniqueidentifier = null output,
@EVENTBASECURRENCYDECIMALDIGITS tinyint = null output,
@EVENTBASECURRENCYROUNDINGTYPECODE tinyint = null output
)
as
begin
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@TSLONG = EVENTPRICE.TSLONG,
@EVENTREGISTRATIONTYPE = dbo.UFN_EVENTREGISTRATIONTYPE_GETDESCRIPTION(EVENTPRICE.EVENTREGISTRATIONTYPEID),
@AMOUNT = EVENTPRICE.AMOUNT,
@RECEIPTAMOUNT = EVENTPRICE.RECEIPTAMOUNT,
@COST = EVENTPRICE.COST,
@BENEFIT = dbo.UFN_EVENTPRICE_GETBENEFITS_2_TOITEMLISTXML(EVENTPRICE.ID),
@NAME = EVENTPRICE.NAME,
@REGISTRATIONCOUNT = EVENTPRICE.REGISTRATIONCOUNT,
@BASECURRENCYID = EVENT.BASECURRENCYID
--@DESIGNATION = dbo.UFN_EVENTPRICE_GETDESIGNATIONS_TOITEMLISTXML(EVENTPRICE.ID)
--@DESIGNATIONAMOUNT = dbo.UFN_EVENTPRICEDESIGNATION_GETTOTALDESIGNATIONAMOUNT(EVENTPRICE.ID)
from
dbo.EVENTPRICE
inner join dbo.EVENT on EVENTPRICE.EVENTID = EVENT.ID
where
EVENTPRICE.ID = @ID
select
@EVENTBASECURRENCYDECIMALDIGITS = DECIMALDIGITS,
@EVENTBASECURRENCYROUNDINGTYPECODE = ROUNDINGTYPECODE
from
dbo.CURRENCY
where
ID = @BASECURRENCYID;
return 0
end