USP_DATAFORMTEMPLATE_ADD_EVENTAUCTIONITEM_PRELOAD
The load procedure used by the edit dataform template "Event Auction Item Add Data Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CONTEXTID | uniqueidentifier | IN | Input parameter indicating the context ID for the record being added. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@EVENTAUCTIONID | uniqueidentifier | INOUT | Auction |
@PDACCOUNTSYSTEMID | uniqueidentifier | INOUT | Account system |
@SHOWACCOUNTSYSTEM | bit | INOUT | Show Account System |
@AUCTIONBASECURRENCYID | uniqueidentifier | INOUT | Auction base currency |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_EVENTAUCTIONITEM_PRELOAD
(
@CONTEXTID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier = null,
@EVENTAUCTIONID uniqueidentifier = null output,
@PDACCOUNTSYSTEMID uniqueidentifier = null output,
@SHOWACCOUNTSYSTEM bit = null output,
@AUCTIONBASECURRENCYID uniqueidentifier = null output
)
as
set nocount on;
if @CONTEXTID is not null
begin
set @EVENTAUCTIONID = @CONTEXTID;
select @AUCTIONBASECURRENCYID = BASECURRENCYID
from dbo.EVENT
where ID = @EVENTAUCTIONID;
end
declare @NUMBEROFACCOUNTSYSTEMSFORUSER smallint
set @NUMBEROFACCOUNTSYSTEMSFORUSER = dbo.UFN_PDACCOUNTSYSTEM_GETNUMBEROFSYSTEMSFORUSER(@CURRENTAPPUSERID)
if @NUMBEROFACCOUNTSYSTEMSFORUSER = 1
begin
set @SHOWACCOUNTSYSTEM = 0
select @PDACCOUNTSYSTEMID = T1.ID from dbo.UFN_PDACCOUNTSYSTEM_GETSYSTEMIDSFORUSER(@CURRENTAPPUSERID) as T1
end
else
begin
set @SHOWACCOUNTSYSTEM = 1;
set @PDACCOUNTSYSTEMID = dbo.UFN_PDACCOUNTSYSTEM_GETDEFAULTSYSTEMIDSFORUSER(@CURRENTAPPUSERID)
end