USP_DATAFORMTEMPLATE_EDIT_ACTION_ITEM_PETITION
The save procedure used by the edit dataform template "Action Item Petition Edit Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter indicating the ID of the record being edited. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@ACTIONITEMID | uniqueidentifier | IN | Actionitem |
@GOAL | int | IN | Goal |
@PETITIONCOUNT | int | IN | Petitioncount |
@MINCOUNT | int | IN | Mincount |
@STARTCOUNT | int | IN | Startcount |
@SIGNATUREDISPLAY | bit | IN | Signaturedisplay |
@HIDEADVOCATEMESSAGE | bit | IN | Hideadvocatemessage |
@THERMOMETERDISPLAY | bit | IN | Thermometerdisplay |
@COUNTDISPLAY | bit | IN | Countdisplay |
@THERMOMETERTYPECODE | tinyint | IN | Thermometertype |
@THERMOMETERPOSITIONCODE | tinyint | IN | Thermometerposition |
@INCLUDEPETITIONCOUNT | bit | IN | Includepetitioncount |
@SIGNATUREDISPLAYLABEL | nvarchar(200) | IN | Signaturedisplaylabel |
@INCLUDEPETITIONDEADLINE | bit | IN | Includepetitiondeadline |
@DEADLINETEXT | nvarchar(200) | IN | Deadlinetext |
@DEADLINEDATE | nvarchar(200) | IN | Deadlinedate |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_EDIT_ACTION_ITEM_PETITION
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@ACTIONITEMID uniqueidentifier,
@GOAL int,
@PETITIONCOUNT int,
@MINCOUNT int,
@STARTCOUNT int,
@SIGNATUREDISPLAY bit,
@HIDEADVOCATEMESSAGE bit,
@THERMOMETERDISPLAY bit,
@COUNTDISPLAY bit,
@THERMOMETERTYPECODE tinyint,
@THERMOMETERPOSITIONCODE tinyint,
@INCLUDEPETITIONCOUNT bit,
@SIGNATUREDISPLAYLABEL nvarchar(200),
@INCLUDEPETITIONDEADLINE bit,
@DEADLINETEXT nvarchar(200),
@DEADLINEDATE nvarchar(200)
)
as
set nocount on;
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output
begin try
-- handle updating the data
update dbo.ACTIONITEMPETITION set
ACTIONITEMID = @ACTIONITEMID,
GOAL = @GOAL,
PETITIONCOUNT = @PETITIONCOUNT,
MINCOUNT = @MINCOUNT,
STARTCOUNT = @STARTCOUNT,
SIGNATUREDISPLAY = @SIGNATUREDISPLAY,
HIDEADVOCATEMESSAGE = @HIDEADVOCATEMESSAGE,
THERMOMETERDISPLAY = @THERMOMETERDISPLAY,
COUNTDISPLAY = @COUNTDISPLAY,
THERMOMETERTYPECODE = @THERMOMETERTYPECODE,
THERMOMETERPOSITIONCODE = @THERMOMETERPOSITIONCODE,
INCLUDEPETITIONCOUNT = @INCLUDEPETITIONCOUNT,
SIGNATUREDISPLAYLABEL = @SIGNATUREDISPLAYLABEL,
INCLUDEPETITIONDEADLINE = @INCLUDEPETITIONDEADLINE,
DEADLINETEXT = @DEADLINETEXT,
DEADLINEDATE = @DEADLINEDATE,
CHANGEDBYID = @CHANGEAGENTID,
DATECHANGED = getdate()
where ID = @ID
end try
begin catch
exec dbo.USP_RAISE_ERROR
return 1
end catch
return 0;