USP_APPUSERNCROLE_DELETE
Executes the "Client User Role Delete" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | int | IN | Input parameter indicating the ID of the record being deleted. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the delete. |
@APPUSERID | uniqueidentifier | IN |
Definition
Copy
CREATE procedure dbo.USP_APPUSERNCROLE_DELETE
(
@ID int,
@CHANGEAGENTID uniqueidentifier,
@APPUSERID uniqueidentifier
)
as begin
declare @ClientUsersId int
select
@ClientUsersId = ClientUsers.ID
from dbo.ClientUsers
join dbo.BBNCUSERMAP on dbo.ClientUsers.UserName=BBNCUSERMAP.BBNCUSERNAME
where BBNCUSERMAP.ID=@APPUSERID
delete from UserRoles where ClientUsersID=@ClientUsersId and ClientRolesID=@ID
return 0;
end