Added code to raise an error if trying to paste a step in reference to a step that has been deleted by another user (eg: paste before, paste after or paste replace)
Added handlers for new treeview events of NodeCopy and ClipboardStatus Added exception handlers to handle the exception of trying to use a deleted step as a reference point for a paste operation (before, after or replace) Added code to set the MyCopyStep property to the value of the new step added in a paste replace operation
This commit is contained in:
@@ -53,6 +53,11 @@ BEGIN TRY -- Try Block
|
||||
ContentID INT
|
||||
)
|
||||
|
||||
if exists (select * from tblitems where itemid = @ItemID and DeleteStatus !=0)
|
||||
BEGIN
|
||||
RAISERROR ('###Cannot Paste Step###This current step has been deleted in another session',16,1)
|
||||
RETURN
|
||||
END
|
||||
-- First check if the replaced item can be deleted, i.e. it doesn't have transitions
|
||||
-- pointing to it or children.
|
||||
|
||||
@@ -419,6 +424,11 @@ WITH EXECUTE AS OWNER
|
||||
AS
|
||||
BEGIN TRY -- Try Block
|
||||
BEGIN TRANSACTION
|
||||
if exists (select * from tblitems where itemid = @ItemID and DeleteStatus !=0)
|
||||
BEGIN
|
||||
RAISERROR ('###Cannot Paste Step###This current step has been deleted in another session',16,1)
|
||||
RETURN
|
||||
END
|
||||
-- First make a copy of the input StartItemID
|
||||
-- DestFormatID is the formatid for the destination parent's format
|
||||
DECLARE @DestFormatID int
|
||||
@@ -526,6 +536,11 @@ WITH EXECUTE AS OWNER
|
||||
AS
|
||||
BEGIN TRY -- Try Block
|
||||
BEGIN TRANSACTION
|
||||
if exists (select * from tblitems where itemid = @ItemID and DeleteStatus !=0)
|
||||
BEGIN
|
||||
RAISERROR ('###Cannot Paste Step###This current step has been deleted in another session',16,1)
|
||||
RETURN
|
||||
END
|
||||
-- First make a copy of the input CopyStartID
|
||||
-- DestFormatID is the formatid for the destination parent's format
|
||||
DECLARE @DestFormatID int
|
||||
|
Reference in New Issue
Block a user