spAddUpdate_Notification
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @PKID | int | INOUT | |
| @NotificationTypeID | int | IN | |
| @DisplayName | nvarchar(100) | IN | |
| @Description | nvarchar(255) | IN | |
| @EmailTemplateID | int | IN | |
| @Enabled | bit | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spAddUpdate_Notification]
(
@PKID int output,
@NotificationTypeID int,
@DisplayName nvarchar(100),
@Description nvarchar(255),
@EmailTemplateID int,
@Enabled bit
)
AS
BEGIN
IF (@PKID<=0)
BEGIN
INSERT INTO NC_Notification
(
NotificationTypeID,
DisplayName,
Description,
EmailTemplateID,
Enabled
)
VALUES
(
@NotificationTypeID,
@DisplayName,
@Description,
@EmailTemplateID,
@Enabled
)
SELECT @PKID = @@Identity
END
ELSE
UPDATE NC_Notification SET
NotificationTypeID = @NotificationTypeID,
DisplayName = @DisplayName,
Description = @Description,
EmailTemplateID = @EmailTemplateID,
Enabled = @Enabled
WHERE [ID]=@PKID
END