USP_DATAFORMTEMPLATE_LOAD_AUCTIONITEMBATCHROW
The load procedure used by the edit dataform template "Auction Item Batch Row Edit 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. |
| @SEQUENCE | int | INOUT | Sequence |
| @CONSTITUENTID | uniqueidentifier | INOUT | Constituent |
| @CONSTITUENTLOOKUPID | uniqueidentifier | INOUT | Lookup ID |
| @NEWCONSTITUENT | xml | INOUT | New constituent |
| @NAME | nvarchar(100) | INOUT | Item name |
| @AUCTIONITEMCATEGORYID | uniqueidentifier | INOUT | Category |
| @AUCTIONITEMSUBCATEGORYID | uniqueidentifier | INOUT | Subcategory |
| @DESCRIPTION | nvarchar(255) | INOUT | Description |
| @EVENTAUCTIONID | uniqueidentifier | INOUT | Auction |
| @DESIGNATIONID | uniqueidentifier | INOUT | Designation |
| @VALUE | money | INOUT | Value |
| @MINIMUMBID | money | INOUT | Minimum bid |
| @DONATIONDATE | date | INOUT | Donation date |
| @EXPIRATIONDATE | date | INOUT | Expiration date |
| @GIVENANONYMOUSLY | bit | INOUT | Given anonymously |
| @PDACCOUNTSYSTEMID | uniqueidentifier | INOUT | Account system |
| @POSTDATE | datetime | INOUT | Post date |
| @POSTSTATUSCODE | tinyint | INOUT | Post status |
| @TRANSACTIONCURRENCYID | uniqueidentifier | INOUT | Transaction currency |
| @BASECURRENCYID | uniqueidentifier | INOUT | Base currency |
| @BASEEXCHANGERATEID | uniqueidentifier | INOUT | Base exchange rate |
| @EXCHANGERATE | decimal(20, 8) | INOUT | Exchange rate |
| @BASEVALUE | money | INOUT | Base value |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_LOAD_AUCTIONITEMBATCHROW
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@SEQUENCE int = null output,
@CONSTITUENTID uniqueidentifier = null output,
@CONSTITUENTLOOKUPID uniqueidentifier = null output,
@NEWCONSTITUENT xml = null output,
@NAME nvarchar(100) = null output,
@AUCTIONITEMCATEGORYID uniqueidentifier = null output,
@AUCTIONITEMSUBCATEGORYID uniqueidentifier = null output,
@DESCRIPTION nvarchar(255) = null output,
@EVENTAUCTIONID uniqueidentifier = null output,
@DESIGNATIONID uniqueidentifier = null output,
@VALUE money = null output,
@MINIMUMBID money = null output,
@DONATIONDATE date = null output,
@EXPIRATIONDATE date = null output,
@GIVENANONYMOUSLY bit = null output,
@PDACCOUNTSYSTEMID uniqueidentifier = null output,
@POSTDATE datetime = null output,
@POSTSTATUSCODE tinyint = null output,
@TRANSACTIONCURRENCYID uniqueidentifier = null output,
@BASECURRENCYID uniqueidentifier = null output,
@BASEEXCHANGERATEID uniqueidentifier = null output,
@EXCHANGERATE decimal(20,8) = null output,
@BASEVALUE money = null output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@SEQUENCE = SEQUENCE,
@CONSTITUENTID = CONSTITUENTID,
@CONSTITUENTLOOKUPID = CONSTITUENTID,
@NAME = NAME,
@AUCTIONITEMCATEGORYID = AUCTIONITEMCATEGORYID,
@AUCTIONITEMSUBCATEGORYID = AUCTIONITEMSUBCATEGORYID,
@DESCRIPTION = DESCRIPTION,
@EVENTAUCTIONID = EVENTAUCTIONID,
@DESIGNATIONID = DESIGNATIONID,
@VALUE = VALUE,
@MINIMUMBID = MINIMUMBID,
@DONATIONDATE = DONATIONDATE,
@EXPIRATIONDATE = EXPIRATIONDATE,
@GIVENANONYMOUSLY = GIVENANONYMOUSLY,
@PDACCOUNTSYSTEMID = PDACCOUNTSYSTEMID,
@POSTDATE = POSTDATE,
@POSTSTATUSCODE = POSTSTATUSCODE,
@TRANSACTIONCURRENCYID = TRANSACTIONCURRENCYID,
@BASECURRENCYID = BASECURRENCYID,
@BASEEXCHANGERATEID = BASEEXCHANGERATEID,
@EXCHANGERATE = EXCHANGERATE
from dbo.BATCHAUCTIONITEM
where ID = @ID;
if @BASECURRENCYID is null
begin
--Multicurrency - Retrieve base currency from the account system's currency set.
declare @CURRENCYSETID uniqueidentifier;
select @CURRENCYSETID = CURRENCYSETID from dbo.PDACCOUNTSYSTEM where ID = @PDACCOUNTSYSTEMID;
select
@BASECURRENCYID = BASECURRENCYID
from
dbo.CURRENCYSET
where
ID = coalesce(@CURRENCYSETID,dbo.UFN_CURRENCYSET_GETAPPUSERDEFAULTCURRENCYSET());
if @BASECURRENCYID is null
select @BASECURRENCYID = dbo.UFN_CURRENCY_GETORGANIZATIONCURRENCY();
end
-- Get base value for the auction item value
exec dbo.USP_CURRENCY_GETCURRENCYVALUES
@VALUE,
@DONATIONDATE,
@BASECURRENCYID,
@BASEEXCHANGERATEID,
@TRANSACTIONCURRENCYID,
@BASEVALUE output;