spAddUpdate_PersonalizedContentData
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | INOUT | |
@SiteContentID | int | IN | |
@ParentID | int | IN | |
@ParentType | int | IN | |
@UserPageId | int | IN | |
@XMLData | ntext | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spAddUpdate_PersonalizedContentData]
(
@PKID int output,
@SiteContentID int,
@ParentID int,
@ParentType int,
@UserPageId int,
@XMLData ntext
)
AS
begin transaction
if (@PKID<=0)
begin
INSERT INTO PersonalizedContentData
(
SiteContentID ,
ParentID ,
ParentType ,
UserPageID ,
[XMLData]
)VALUES(
@SiteContentID ,
@ParentID ,
@ParentType ,
@UserPageId ,
@XMLData
)
SELECT
@PKID = @@Identity
end else begin
UPDATE PersonalizedContentData SET
SiteContentID =@SiteContentID,
ParentID =@ParentID ,
ParentType =@ParentType,
UserPageID =@UserPageId,
[XMLData] =@XMLData
WHERE ID=@PKID
end
commit transaction