USP_BANKACCOUNTDEPOSIT_LOCK
Executes the "Lock Deposit" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | Input parameter indicating the ID of the record being updated. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the update. |
Definition
Copy
CREATE procedure dbo.USP_BANKACCOUNTDEPOSIT_LOCK
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier
)
as begin
set nocount on;
declare @CURRENTDATE datetime;
if @CHANGEAGENTID is null exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;
set @CURRENTDATE = getdate();
UPDATE dbo.BANKACCOUNTDEPOSIT SET STATUSCODE=0, CHANGEDBYID=@CHANGEAGENTID, DATECHANGED=@CURRENTDATE WHERE ID=@ID AND STATUSCODE<>0
return 0;
end