spAddUpdate_EducationEdit

Parameters

Parameter Parameter Type Mode Description
@PKID int INOUT
@AllowAdd bit IN
@AllowDelete bit IN
@AllowPrimaryEdit bit IN
@AllowPrimaryDelete bit IN
@PostPageID int IN
@Guid uniqueidentifier IN
@SiteContentID int IN
@PersonalPageDataID int IN
@PrimaryShow bit IN
@NoRecordMsg nvarchar(2048) IN

Definition

Copy


CREATE   PROCEDURE dbo.spAddUpdate_EducationEdit
        (
            @PKID                int output        ,
            @AllowAdd             bit,
            @AllowDelete         bit,
            @AllowPrimaryEdit     bit,
            @AllowPrimaryDelete     bit,
            @PostPageID            int,
            @Guid                uniqueidentifier,
            @SiteContentID        int,
            @PersonalPageDataID int,
            @PrimaryShow        bit,
            @NoRecordMsg nvarchar (2048)
        )
        AS

        begin transaction

        if (@PKID<=0)

        begin

            INSERT INTO EducationEdit
            (
            AllowAdd        ,
            AllowDelete        ,
            AllowPrimaryEdit,
            AllowPrimaryDelete,
            PostPageID            ,
            Guid            ,
            SiteContentID    ,
            PersonalPageDataID,
            PrimaryShow,
            NoRecordMsg        
            )

            VALUES
            (
            @AllowAdd        ,
            @AllowDelete        ,
            @AllowPrimaryEdit,
            @AllowPrimaryDelete,
            @PostPageID            ,
            @Guid            ,
            @SiteContentID,
            @PersonalPageDataID,
            @PrimaryShow,
            @NoRecordMsg        
            )

            SELECT @PKID = @@Identity

        end 
        else 
        begin
            UPDATE EducationEdit SET
                AllowAdd        =@AllowAdd    ,
                AllowDelete        =@AllowDelete        ,
                AllowPrimaryEdit=@AllowPrimaryEdit    ,
                AllowPrimaryDelete=@AllowPrimaryDelete,
                PostPageID        =@PostPageID    ,
                Guid            =@Guid            ,
                SiteContentID    =@SiteContentID            ,
                PersonalPageDataID = @PersonalPageDataID,
                PrimaryShow    =@PrimaryShow,
                NoRecordMsg=@NoRecordMsg
            WHERE ID=@PKID
        end

        commit transaction