spGetClientUser_NotificationSubscription
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ClientUserID | int | IN | |
| @NotificationTypeID | int | IN | |
| @ContextID | int | IN |
Definition
Copy
CREATE PROCEDURE dbo.spGetClientUser_NotificationSubscription
(
@ClientUserID int,
@NotificationTypeID int,
@ContextID int
)
AS
DECLARE @NotificationID int
SELECT @NotificationID = dbo.fnGetNotificationByType(@NotificationTypeID, @ContextID)
DECLARE @NotificationSubscriptionID int
if @NotificationID > 0
begin
SELECT @NotificationSubscriptionID = ID
FROM NotificationSubscription
WHERE
NotificationID = @NotificationID AND
UserID = @ClientUserID
end
SELECT ISNULL(@NotificationID,0) 'NotificationID' , ISNULL(@NotificationSubscriptionID,0) 'NotificationSubscriptionID'