USP_DATAFORMTEMPLATE_ADD_SPONSORSHIPOPPORTUNITYSEARCHSETTINGS

The save procedure used by the add dataform template "Sponsorship Opportunity Search CMS Settings Add Form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier INOUT The output parameter indicating the ID of the record added.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@SEARCHRESULTHTML nvarchar(max) IN Searchresulthtml
@SEARCHCRITERIADESIGNCODE tinyint IN Searchcriteriadesign
@HTMLSEARCHRESULTCODE tinyint IN Htmlsearchresult
@SHOWPAGINGCONTROLSCODE tinyint IN Showpagingcontrols
@AUTOSEARCHENABLED bit IN Autosearchenabled
@SEARCHCOLUMNS int IN Searchcolumns
@SIMPLEFIELDSLIST xml IN Simplefieldslist
@ADVANCEDFIELDSLIST xml IN Advancedfieldslist
@OUTPUTFIELDSLIST xml IN Outputfieldslist
@RECORDSPERPAGE int IN Recordsperpage
@COLUMNSPERPAGE int IN Columnsperpage
@RESULTSPERSESSION int IN Resultspersession
@QUERYVIEWID uniqueidentifier IN Queryviewid
@QUERYID uniqueidentifier IN Queryid
@SPONSORSHIPFORMPAGEID int IN SponsorshipFormPageId
@RESULTSFROMQUERY int IN

Definition

Copy

              CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_SPONSORSHIPOPPORTUNITYSEARCHSETTINGS
              (
                  @ID uniqueidentifier = null output,
                  @CHANGEAGENTID uniqueidentifier = null,
                  @SEARCHRESULTHTML nvarchar(max) = '',
                  @SEARCHCRITERIADESIGNCODE tinyint = 0,
                  @HTMLSEARCHRESULTCODE tinyint = 0,
                  @SHOWPAGINGCONTROLSCODE tinyint = 0,
                  @AUTOSEARCHENABLED bit = 0,
                  @SEARCHCOLUMNS int = 0,
                  @SIMPLEFIELDSLIST xml = null,
                  @ADVANCEDFIELDSLIST xml = null,
                  @OUTPUTFIELDSLIST xml = null,
                  @RECORDSPERPAGE int = 0,
                  @COLUMNSPERPAGE int = 0,
                  @RESULTSPERSESSION int = 0,
                  @QUERYVIEWID uniqueidentifier = null,
                  @QUERYID uniqueidentifier = null,
                  @SPONSORSHIPFORMPAGEID int = null,
                  @RESULTSFROMQUERY int = null
              )
              as

              set nocount on;

              if @ID is null
                  set @ID = newid()

              if @CHANGEAGENTID is null  
                  exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output

              declare @CURRENTDATE datetime
              set @CURRENTDATE = getdate()

              begin try
                  insert into dbo.SPONSORSHIPOPPORTUNITYSEARCHCMSSETTINGS
                      (ID, SEARCHRESULTHTML, SEARCHCRITERIADESIGNCODE, HTMLSEARCHRESULTCODE, SHOWPAGINGCONTROLSCODE, AUTOSEARCHENABLED, SEARCHCOLUMNS, SIMPLEFIELDSLIST, ADVANCEDFIELDSLIST, OUTPUTFIELDSLIST, RECORDSPERPAGE, COLUMNSPERPAGE, RESULTSPERSESSION, QUERYVIEWID, QUERYID, ADDEDBYID, CHANGEDBYID, DATEADDED, DATECHANGED, SPONSORSHIPFORMPAGEID, RESULTSFROMQUERY)
                  values
                      (@ID, @SEARCHRESULTHTML, @SEARCHCRITERIADESIGNCODE, @HTMLSEARCHRESULTCODE, @SHOWPAGINGCONTROLSCODE, @AUTOSEARCHENABLED, @SEARCHCOLUMNS, @SIMPLEFIELDSLIST, @ADVANCEDFIELDSLIST, @OUTPUTFIELDSLIST, @RECORDSPERPAGE, @COLUMNSPERPAGE, @RESULTSPERSESSION, @QUERYVIEWID, @QUERYID, @CHANGEAGENTID, @CHANGEAGENTID, @CURRENTDATE, @CURRENTDATE, @SPONSORSHIPFORMPAGEID, @RESULTSFROMQUERY)
              end try

              begin catch
                  exec dbo.USP_RAISE_ERROR
                  return 1
              end catch

              return 0