USP_DATAFORMTEMPLATE_EDITLOAD_AMPROIMPORTCONFIG
The load procedure used by the edit dataform template "AuctionMaestro Pro Import Configuration 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. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@PDACCOUNTSYSTEMID | uniqueidentifier | INOUT | Account system |
@NEWITEMDESIGNATIONID | uniqueidentifier | INOUT | New item designation |
@FUNDITEMDESIGNATIONID | uniqueidentifier | INOUT | Fund-An-Item designation |
@SHOWACCOUNTSYSTEM | bit | INOUT | Show Account System |
@NEWCONSTITUENTSECURITYID | uniqueidentifier | INOUT | Default security group for new constituents |
@NEWCONSTITUENTSITEID | uniqueidentifier | INOUT | Default site for new constituents |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_AMPROIMPORTCONFIG
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@CURRENTAPPUSERID uniqueidentifier = null,
@PDACCOUNTSYSTEMID uniqueidentifier = null output,
@NEWITEMDESIGNATIONID uniqueidentifier = null output,
@FUNDITEMDESIGNATIONID uniqueidentifier = null output,
@SHOWACCOUNTSYSTEM bit = null output,
@NEWCONSTITUENTSECURITYID uniqueidentifier = null output,
@NEWCONSTITUENTSITEID uniqueidentifier = null output
)
as
set nocount on;
set @DATALOADED = 1;
select top 1
@PDACCOUNTSYSTEMID = PDACCOUNTSYSTEMID,
@NEWITEMDESIGNATIONID = NEWITEMDESIGNATIONID,
@FUNDITEMDESIGNATIONID = FUNDITEMDESIGNATIONID,
@NEWCONSTITUENTSECURITYID = NEWCONSTITUENTSECURITYID,
@NEWCONSTITUENTSITEID = NEWCONSTITUENTSITEID,
@TSLONG = TSLONG
from dbo.AMPROIMPORTCONFIG
where ID = @ID;
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
--Validate the system against the event. If it doesn't validate, the user will get an error about an invisible
--accounting system, which is no good.
if dbo.UFN_AMPROIMPORT_VALIDATEACCOUNTSYSTEMSITES(@ID, @PDACCOUNTSYSTEMID) = 0
set @SHOWACCOUNTSYSTEM = 1
end
else
begin
set @SHOWACCOUNTSYSTEM = 1;
set @PDACCOUNTSYSTEMID = dbo.UFN_PDACCOUNTSYSTEM_GETDEFAULTSYSTEMIDSFORUSER(@CURRENTAPPUSERID)
end