USP_PROJECT_DELETE

Executes the "Project: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being deleted.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the delete.

Definition

Copy


CREATE procedure dbo.USP_PROJECT_DELETE
(
    @ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier
)
as begin
    set nocount on;

    begin try
        begin transaction

        -- use the system generated delete routine to allow proper recording of the deleting agent

        exec USP_PROJECT_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
        -- Now delete the row from the accounting element table

        exec dbo.USP_PDACCOUNTSEGMENTVALUE_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
        commit transaction
    end try

    begin catch
        rollback transaction
        exec dbo.USP_RAISE_ERROR
        return 1;
    end catch

    return 0;


end