spAddUpdate_SiteProfilePhotoForm
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | INOUT | |
@ContentID | int | IN | |
@CaptionEditable | bit | IN | |
@DefaultCaption | nvarchar(255) | IN | |
@PhotoEditable | bit | IN | |
@ApprovalRequired | bit | IN | |
@ThumbSize | int | IN | |
@CategoryFolderID | int | IN | |
@AfterUpdatePageID | int | IN | |
@LargeSize | int | IN | |
@TAGCODEID | uniqueidentifier | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spAddUpdate_SiteProfilePhotoForm]
(
@PKID int output,
@ContentID int,
@CaptionEditable bit,
@DefaultCaption nvarchar(255),
@PhotoEditable bit,
@ApprovalRequired bit,
@ThumbSize int,
@CategoryFolderID int,
@AfterUpdatePageID int,
@LargeSize int,
@TAGCODEID uniqueidentifier = null
)
AS
BEGIN
IF EXISTS(SELECT ContentID FROM SiteProfilePhotoForm WHERE ContentID = @ContentID)
UPDATE SiteProfilePhotoForm
SET
CaptionEditable = @CaptionEditable,
DefaultCaption = @DefaultCaption,
PhotoEditable = @PhotoEditable,
ApprovalRequired = @ApprovalRequired,
ThumbSize = @ThumbSize,
CategoryFolderID = @CategoryFolderID,
AfterUpdatePageID = @AfterUpdatePageID,
LargeSize = @LargeSize,
TAGCODEID = @TAGCODEID
WHERE ContentID = @ContentID
ELSE
INSERT INTO SiteProfilePhotoForm
(
ContentId,
CaptionEditable,
DefaultCaption,
PhotoEditable,
ApprovalRequired,
ThumbSize,
CategoryFolderID,
AfterUpdatePageID,
LargeSize,
TAGCODEID
)
VALUES
(
@ContentID,
@CaptionEditable,
@DefaultCaption,
@PhotoEditable,
@ApprovalRequired,
@ThumbSize,
@CategoryFolderID,
@AfterUpdatePageID,
@LargeSize,
@TAGCODEID
)
SELECT @PKID = @ContentID
END