Compare commits

..

29 Commits

Author SHA1 Message Date
Kevin Laskey
c05e493579 C2021-059 Attempting to resolve conflicts try 1 2024-08-01 14:52:38 -04:00
Kevin Laskey
2714973c16 2021-059 - Matchicng Paul's Changes 2024-08-01 14:49:14 -04:00
Kevin Laskey
5f86d8c629 C2021-059 - Update designer to avoid conflict 2024-08-01 14:41:34 -04:00
Kevin Laskey
977ea6f5fc C2021-059 - Update proms sql fixes with correct numbers 2024-08-01 11:01:28 -04:00
Kevin Laskey
a8bbda1281 C2024-005 - Completed some updates for nested folder selection (parent unselect) 2024-08-01 09:23:30 -04:00
Kevin Laskey
da1b061eb1 C2024-005 - Added orphan record clearing progress bar, confirmation message 2024-07-30 08:54:13 -04:00
Kevin Laskey
4644699df0 C20240-005 - Deleting Folder additions 2024-07-29 15:57:54 -04:00
Kevin Laskey
6e6abbd759 C2024-005 - Kevin working on folder retrieval 2024-07-22 09:28:48 -04:00
Kathy Ruffing
501798a8cb Merge pull request 'C2024-005-Annotations-Cleanup-2' (#355) from C2024-005-Annototions-Cleanup-2 into Development
Reviewed-on: #355
Reviewed-by: Kathy Ruffing <kruffing@volian.com>
Code reviewed successfully
2024-07-18 11:39:12 -04:00
a240bc2c19 C2024-005-Annotations-Cleanup-2 2024-07-18 11:31:49 -04:00
a804a3866a C2024-005-Annotations-Cleanup-2 2024-07-18 11:12:30 -04:00
069ffb80e9 C2024-005-Annotations-Cleanup-2 2024-07-17 14:28:24 -04:00
Kevin Laskey
5255080291 Merge pull request 'B2022-118: search of multi value ROs fails' (#354) from B2022-118 into Development
Reviewed-on: #354
2024-07-17 10:56:40 -04:00
Kathy Ruffing
ae35d9f0d7 B2022-118: search of multi value ROs fails 2024-07-17 10:11:43 -04:00
afbd653611 Merge pull request 'B2024-041 - Update PromsFixes SQL file to acocunt for replacing vs pasting procs' (#352) from B2024-041_v2 into Development
good for testing phase
2024-07-16 16:27:35 -04:00
Kevin Laskey
9a55111e1e B2024-041 - Update PromsFixes SQL file to acocunt for replacing vs pasting procs 2024-07-16 16:20:21 -04:00
422a3053b7 Merge pull request 'B2024-039 Customer reported that transitions to standard text get converted to text when the Refresh Transitions is done from the Admin Tools' (#350) from B2024-039_BNPP_StdtxtTrans into Development
format only changes
2024-07-12 14:16:22 -04:00
feb74ee09f B2024-039 Customer reported that transitions to standard text get converted to text when the Refresh Transitions is done from the Admin Tools 2024-07-12 14:14:23 -04:00
7cebb2b7f1 Merge pull request 'B2024-037: Bug fix for copy/replace functionality on procedures and steps.' (#349) from B2024-037 into Development
changes look good. OK for testing phase.
2024-07-11 10:54:10 -04:00
Kevin Laskey
8097c6283c B2024-037 - Update versioning on proms fixes 2024-07-11 10:30:31 -04:00
Kevin Laskey
8f08ef5ee4 B2024-037 - Slight clean up on parentedititme 2024-07-11 08:45:18 -04:00
Kevin Laskey
fd26f16776 B2024-037 Include proms sql fixes for copy replace functionality 2024-07-10 14:53:20 -04:00
Kevin Laskey
21a83df99d B2024-037 - Fixes made for replacing procs and steps via paste/replace functionality. 2024-07-10 12:15:14 -04:00
616acf0e37 Merge pull request 'F2024-065 - Turned off the CapRoIfLastLower flag in all of the Beaver Valley formats F2024-066 - Turned off the Replace Words feature in EOP, “without Issue Number”, and the SAMG Background formats' (#347) from F2024-065-066-BeaverValley into Development
Format only changes
2024-07-03 10:08:45 -04:00
3cff87cf97 F2024-065 - Turned off the CapRoIfLastLower flag in all of the Beaver Valley formats F2024-066 - Turned off the Replace Words feature in EOP, “without Issue Number”, and the SAMG Background formats 2024-07-03 10:01:03 -04:00
Kathy Ruffing
9202d903a5 Merge pull request 'F2024-064: underline and spacing of section titles' (#345) from F2024-064 into Development
Reviewed-on: #345
2024-07-01 09:27:34 -04:00
Kathy Ruffing
a9a9a56c09 F2024-064: underline and spacing of section titles 2024-07-01 09:15:42 -04:00
aee7819a9c Merge pull request 'C2024-013: On print dialog, disable Merge button if creating hyperlinks' (#343) from C2024-013 into Development
code changed reviewed and can proceed to testing phase
2024-06-25 13:42:33 -04:00
Kathy Ruffing
d3bc1c4725 C2024-013: On print dialog, disable Merge button if creating hyperlinks 2024-06-25 12:14:26 -04:00
48 changed files with 1630 additions and 1370508 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1320,6 +1320,10 @@ namespace VEPROMS
if (swtbtnPDFLinks.Value) if (swtbtnPDFLinks.Value)
swtbtnPDFdtPrefixSuffix.Value = false; swtbtnPDFdtPrefixSuffix.Value = false;
BuildPDFFileName(); BuildPDFFileName();
// C2024-013: When Create RO & Transition Hyperlinks in pdf is ON, disable the MergePdf
// button. The Create RO & Transition Hyperlinks option looks for individual file names
// for procedures.
btnMergePDFs.Enabled = !swtbtnPDFLinks.Value;
} }
// C2019-004: Allow user to define duplex blank page text. The text box for blank page text is always enabled for procedures with // C2019-004: Allow user to define duplex blank page text. The text box for blank page text is always enabled for procedures with

View File

@@ -1,3 +1,5 @@
Set NoCount On; Set NoCount On;
If (db_name() in('master','model','msdn','tempdb')) If (db_name() in('master','model','msdn','tempdb'))
@@ -22230,12 +22232,13 @@ Go
/* /*
========================================================================================================== ==========================================================================================================
Begin: C2024-004: KL - Update Copy Replace functionality, (remove ''copy of'') Begin: C2024-004 | B2024-041: KL - Update Copy Replace functionality, (remove ''copy of'')
========================================================================================================== ==========================================================================================================
*/ */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[CopyItemAndChildren]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [CopyItemAndChildren]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[ReplaceItemAndChildren]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [ReplaceItemAndChildren];
GO GO
/***************************************************************************** /*****************************************************************************
@@ -22245,11 +22248,22 @@ GO
/* /*
========================================================================================================== ==========================================================================================================
Author: Kevin Laskey Author: Kevin Laskey
Modified Date: 07/09/2024 Create Date: 07/15/2024
Description: Copy Item and its Children Description: B2024-041: "Copy of" is no longer being appended for paste before/after
========================================================================================================== ==========================================================================================================
*/ */
CREATE PROCEDURE [dbo].[CopyItemAndChildren]
/****** Object: StoredProcedure [dbo].[CopyItemAndChildren] Script Date: 7/15/2024 9:29:21 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[ReplaceItemAndChildren]
( (
@StartItemID INT, @StartItemID INT,
@DestFormatID INT, @DestFormatID INT,
@@ -22294,7 +22308,6 @@ INSERT INTO @Children SELECT ItemID,ItemID,ContentID,ContentID,FormatID,FormatID
-- <<< Copy Contents >>> -- <<< Copy Contents >>>
-- Create new content rows to match the existing rows. Set the type to the Current ContentID temporarily -- Create new content rows to match the existing rows. Set the type to the Current ContentID temporarily
-- so that the new content rows can be associated with the existing content rows. -- so that the new content rows can be associated with the existing content rows.
-- Rem 'Copy Of ' + before first [Number] for C2024-004 (KL)
INSERT INTO Contents INSERT INTO Contents
([Number],[Text],[Type],[FormatID],[Config],[DTS],[UserID]) ([Number],[Text],[Type],[FormatID],[Config],[DTS],[UserID])
select CASE when [ContentID] = @StartContentID and [Type]<20000 then [Number] else [Number] end, select CASE when [ContentID] = @StartContentID and [Type]<20000 then [Number] else [Number] end,
@@ -22622,21 +22635,624 @@ BEGIN CATCH -- Catch Block
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler EXEC vlnErrorHandler
END CATCH END CATCH
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[PasteItemReplace]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [PasteItemReplace];
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2024 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
/*
==========================================================================================================
Author: Kevin Laskey
Create Date: 07/15/2024
Description: B2024-041: "Copy of" is no longer being appended for paste before/after
==========================================================================================================
*/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object: StoredProcedure [dbo].[PasteItemReplace] Script Date: 03/20/2012 16:02:54 ******/
/*
declare @NewItemID int
declare @dts datetime
set @newitemid = 0
set @dts = getdate()
exec PasteItemReplace 398,397,20014,@dts,'bodine',@NewItemID output
*/
-- ItemID is item to replace
-- StartItemID is item to copy
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[PasteItemReplace]
(
@ItemID int=null, @StartItemID int=null,
@Type int=null, @DTS datetime, @UserID nvarchar(100),
@NewItemID int output
)
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
DECLARE @ContentID AS INT
DECLARE @NextItemID AS INT
DECLARE @PreviousItemID AS INT
DECLARE @ExternalChildCount AS INT
DECLARE @ExternalCount AS INT
DECLARE @Path AS VARCHAR(MAX)
DECLARE @Children AS TABLE
(
ItemID INT PRIMARY KEY,
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.
DECLARE @ExternalTrans TABLE
(
[FromItemID] int,
[TransitionID] [int] NOT NULL,
[FromID] [int] NOT NULL,
[ToID] [int] NOT NULL,
[RangeID] [int] NOT NULL,
[Config] [nvarchar](max) NULL
)
SET NOCOUNT ON
DECLARE @DeleteID int
INSERT INTO DeleteLog (UserID) VALUES (@UserID)
SELECT @DeleteID = SCOPE_IDENTITY()
SELECT @ContentID = ContentID, @PreviousItemID = PreviousID FROM Items WHERE ItemID = @ItemID
SELECT @NextItemID = ItemID FROM Items WHERE PreviousID = @ItemID
--SELECT @ExternalCount = count(*) FROM vefn_FindExternalTransitions(@ItemID)
SELECT @ExternalChildCount = count(*) FROM vefn_FindExternalChildTransitions(@ItemID)
SET @Path = [dbo].[ve_GetShortPath](@ItemID)
--IF @ExternalCount > 0 AND @NextItemID is null
--BEGIN
-- RAISERROR ('###Cannot Delete Item###Step %d has External Transitions and has no next step - (%s)',16,1,@ItemID,@Path)
-- RETURN
--END
IF @ExternalChildCount > 0
BEGIN
RAISERROR ('###Cannot Delete Item###Step %d has External Transitions to it''s children - (%s)',16,1,@ItemID,@Path)
RETURN
END
-- Copy the item, 'NewItemID' represents the new item(s)
-- DestFormatID is the formatid for the destination parent's format
DECLARE @DestFormatID int
SET @DestFormatID = .dbo.vefn_GetInheritedFormat(@ItemID, 0)
EXECUTE ReplaceItemAndChildren @StartItemID, @DestFormatID, @UserID, @NewItemID OUTPUT
-- Adjust the next/previous to point to the new item
DECLARE @PreviousID int
SELECT @PreviousID = [PreviousID]
FROM [ITEMS] II
WHERE [ItemID]=@ItemID
UPDATE [ITEMS] SET [PreviousID]=@PreviousID where [ItemID]=@NewItemID
UPDATE [CONTENTS] SET [Type]=@Type
FROM [CONTENTS] CC JOIN [ITEMS] ii ON CC.[ContentID]=II.[ContentID]
WHERE [ItemID]=@NewItemID
UPDATE [ITEMS] SET [PreviousID]=@NewItemID where [PreviousID]=@ItemID
UPDATE [PARTS] SET [ItemID]=@NewItemID where [ItemID]=@ItemID
-- UPDATE DocVersion if this was a procedure
UPDATE DocVersions SET ItemID=@NewItemID where ItemID = @ItemID
-- If there were 'external transitions' that pointed to the original
-- top replaced step, adjust them to point to the new top.
INSERT INTO @ExternalTrans SELECT * FROM vefn_FindExternalTransitions(@ItemID)
OPTION (MAXRECURSION 10000)
IF (SELECT COUNT(*) from @ExternalTrans) > 0
BEGIN
-- Update content records for the transitions
Update CC
Set Text = DBO.vefn_FixTransitionText(Text,TT.TransitionID,TT.TranType,TT.ToID,TT.RangeID,@ItemID,@NewItemID)
From CONTENTS CC
JOIN Transitions TT ON TT.FromID = CC.ContentID
WHERE TransitionID in(Select TransitionID from @ExternalTrans)
-- Update transitions that point to @ItemID to Point to @NextItemID
UPDATE TRANSITIONS
SET ToID = case when ToID = @ItemID then @NewItemID else ToID END,
RangeID = case when RangeID = @ItemID then @NewItemID else RangeID END
WHERE TransitionID in(Select TransitionID from @ExternalTrans)
DECLARE @typeID int -- AnnotationType
SELECT @typeID = TypeID from AnnotationTypes where Name = 'Verification Required'
IF(@typeID IS NULL)
BEGIN
INSERT INTO [AnnotationTypes] ([Name],[UserID]) VALUES ('Verification Required','Volian')
SELECT @typeID = SCOPE_IDENTITY()
END
-- Add 'Verification Required' annotions for transtions that pointed to top step
-- and need to point to
INSERT INTO [Annotations] ([ItemID],[TypeID],[SearchText],[UserID])
SELECT ItemID, @typeID,'Verify Replaced Step Transition Destination',@UserID
FROM Items where ItemID in (SELECT FromItemID FROM @ExternalTrans)
END
-- Remove the old one
-- Get list of Children
INSERT INTO @Children SELECT * FROM vefn_ChildItems(@ItemID)
-- Delete Annotations for @ItemID and children
DELETE from Annotations where ItemID in(Select ItemID from @Children)
-- Delete Details associated with @ContentID and children
DELETE from Details where ContentID in(Select ContentID from @Children)
-- Delete Grids associated with @ContentID and children
DELETE from Grids where ContentID in(Select ContentID from @Children)
-- Delete Images associated with @ContentID and children
DELETE from Images where ContentID in(Select ContentID from @Children)
-- Delete Entries associated with @ContentID and children
DELETE from Entries where ContentID in(Select ContentID from @Children)
-- Delete ROUsages associated with @ContentID and children
DELETE from RoUsages where ContentID in(Select ContentID from @Children)
-- Delete ZTransitions records associated with @ContentID and children
DELETE FROM ZTransitions where TransitionID
in(SELECT TransitionID from Transitions where FromID in(SELECT ContentID FROM @Children) or FromID = @ContentID)
-- Delete Transitions associated with @ContentID and children
DELETE FROM Transitions where FromID in(SELECT ContentID FROM @Children) or FromID = @ContentID
-- Delete Parts associated with @ContentID and children
DELETE from Parts where ContentID in(Select ContentID from @Children)
-- Delete ZContents associated with @ContentID and children
DELETE from ZContents where ContentID in(Select ContentID from @Children)
-- Disconnect Items from Each Other
DELETE from Items where ItemID in(Select ItemID from @Children) and PreviousID Is Not Null
-- Disconnect Items to be deleted from each other
Update Items set PreviousID = null where ItemID in (Select ItemID from @Children) and PreviousID Is Not Null
-- Delete Item Records
DELETE from Items where ItemID in(Select ItemID from @Children)
-- DELETE Contents
DELETE from Contents where ContentID in(Select ContentID from @Children)
--delete from itemaudits where itemid = @newitemid
delete from itemaudits where itemid in (select itemid from vefn_ChildItems(@newitemid))
--delete from contentaudits where contentid = (select contentid from items where itemid = @newitemid)
delete from contentaudits where contentid in (select contentid from vefn_ChildItems(@newitemid))
DELETE from DeleteLog where DeleteID = @DeleteID
IF( @@TRANCOUNT > 0 ) COMMIT
EXECUTE GetItem @NewItemID
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
go
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[CopyItemAndChildren]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [CopyItemAndChildren];
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2024 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
/*
==========================================================================================================
Author: Kevin Laskey
Create Date: 07/15/2024
Description: B2024-041: "Copy of" is no longer being appended for paste before/after
==========================================================================================================
*/
/****** Object: StoredProcedure [dbo].[CopyItemAndChildren] Script Date: 7/15/2024 10:01:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[CopyItemAndChildren]
(
@StartItemID INT,
@DestFormatID INT,
@UserID NVARCHAR(100),
@NewStartItemID int output
)
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
--+-----------------------------------------------------------------+
--& BEGIN TRANSACTION to make these changes temporary &
--+-----------------------------------------------------------------+
BEGIN TRANSACTION
if exists (select * from tblitems where itemid = @StartItemID and DeleteStatus !=0)
BEGIN
RAISERROR ('###Cannot Paste Step###This step has been deleted',16,1)
RETURN
END
DECLARE @Children AS TABLE
(
ItemID INT PRIMARY KEY,
NewItemID INT,
ContentID INT,
NewContentID INT,
FormatID INT,
NewFormatID INT
)
DECLARE @NewDocuments AS TABLE
(
DocID INT PRIMARY KEY,
NewDocID INT
)
-- Locals
DECLARE @DTS DATETIME -- DTS of all New Items
DECLARE @StartContentID INT
Select @StartContentID = ContentID from Items where ItemID = @StartItemID
SET @DTS = GETDATE() -- Get the current Date and Time
-- Get a list of all of the Items to be copied based upon StartItemID and EndItemID
-- If the StartItemID = EndItemID then it is a single item and it's children
INSERT INTO @Children SELECT ItemID,ItemID,ContentID,ContentID,FormatID,FormatID FROM vefn_ChildItemsRange(@StartItemID,@StartItemID,null)
-- <<< Copy Contents >>>
-- Create new content rows to match the existing rows. Set the type to the Current ContentID temporarily
-- so that the new content rows can be associated with the existing content rows.
INSERT INTO Contents
([Number],[Text],[Type],[FormatID],[Config],[DTS],[UserID])
select CASE when [ContentID] = @StartContentID and [Type]<20000 then 'Copy Of ' + [Number] else [Number] end,
[Text],[ContentID],[FormatID],[Config],@DTS,@UserID
from Contents where ContentID in(Select ContentID from @Children)
-- Update the @Children with the NewConentIDs
--print 'A ' + cast(datediff(s,@dts,getdate()) as varchar(100))
UPDATE NN set NN.NewContentID = CC.ContentID
From Contents CC
Join @Children NN on NN.ContentID = CC.Type AND CC.DTS = @DTS and CC.UserID = @UserID
-- Reset the Type column in the Contents table with the Type column from the original Records.
--print 'B ' + cast(datediff(s,@dts,getdate()) as varchar(100))
DECLARE @SourceType INT
Select @SourceType = Type from Contents where ContentID = @StartContentID
if @SourceType = 0
BEGIN
UPDATE CC set CC.Type = CC2.Type, CC.DTS = CC2.DTS, CC.UserID = CC2.UserID
From Contents CC
Join @Children NN on NN.NewContentID = CC.ContentID
Join Contents CC2 on NN.ContentID = CC2.ContentID
END
else
BEGIN
UPDATE CC set CC.Type = CC2.Type
From Contents CC
Join @Children NN on NN.NewContentID = CC.ContentID
Join Contents CC2 on NN.ContentID = CC2.ContentID
END
--print 'B1 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Contents are done
-- SELECT * From Contents where DTS = @DTS and UserID = @UserID
-- <<< Copy Grids >>>
INSERT INTO [Grids]([ContentID],[Data],[Config],[DTS],[UserID])
SELECT NN.[NewContentID],[Data],[Config],@DTS,@UserID
FROM [Grids] GG Join @Children NN on GG.ContentID = NN.ContentID
-- <<< Copy Images >>>
--print 'B2 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
INSERT INTO [Images]([ContentID],[ImageType],[FileName],[Data],[Config],[DTS],[UserID])
SELECT NN.[NewContentID],[ImageType],[FileName],[Data],[Config],@DTS,@UserID
FROM [Images] II Join @Children NN on II.ContentID = NN.ContentID
-- Create new item rows based upon the current item rows and the @Children table, with the NewContentIDs
--print 'B3 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
INSERT INTO [Items] ([PreviousID],[ContentID],[DTS],[UserID])
SELECT II.[PreviousID], -- Leave the PreviousID as is for now
NN.NewContentID, @DTS, @UserID
from @Children NN
join Items II on II.ContentID = NN.ContentID
-- Update the @Children with the NewItemIDs
--print 'B4 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
UPDATE NN set NN.NewItemID = II.ItemID
From Items II
Join @Children NN on NN.NewContentID = II.ContentID AND II.DTS = @DTS and II.UserID = @UserID
DECLARE @NewItemID int
SELECT @NewItemID = NewItemID
FROM @Children
WHERE ItemID = @StartItemID
--print 'B5 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
UPDATE NN SET NN.[NewFormatID] = CC.[FormatID]
FROM @Children NN
Join vefn_ChildItemsRange(@NewItemID,@NewItemID,@DestFormatID) CC
ON NN.NewItemID = CC.ItemID
-- The @Children table is now complete
--SELECT * From @Children
-- Update the PreviousID in the new Item rows, to the new ItemIDs based upon the old ItemIDs
--print 'B6 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
Update II Set II.[PreviousID] = NN.NewItemID
from Items II
Join @Children NN on NN.ItemID = II.PreviousID AND II.DTS = @DTS and II.UserID = @UserID
-- Get the new ItemIDs based upon the old ItemIDs
SELECT @NewStartItemID = NewItemID from @Children where ItemID = @StartItemID
--SELECT @NewEndItemID = NewItemID from @Children where ItemID = @EndItemID
-- Set the PreviousID for the starting Item to null temporarily.
-- This will be adjusted based upon where the step is inserted.
--print 'B7 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
Update Items Set PreviousID = null where ItemID = @NewStartItemID
if @SourceType = 0
BEGIN
UPDATE II SET II.DTS = II2.DTS, II.UserID = II2.UserID
From Items II
Join @Children NN on NN.NewItemID = II.ItemID
Join Items II2 on NN.ItemID = II2.ItemID
WHERE NN.ItemID = @StartItemID
END
--print 'C ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Items are done
--SELECT * From Items where DTS = @DTS and UserID = @UserID
-- <<< Copy Parts >>>
INSERT INTO [Parts] ([ContentID],[FromType],[ItemID],[DTS],[UserID])
Select NNF.NewContentID,[FromType],NNT.NewItemID, @DTS, @UserID from Parts PP
JOIN @Children NNF on PP.ContentID = NNF.ContentID
JOIN @Children NNT on PP.ItemID = NNT.ItemID
--print 'D ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Parts are done
-- SELECT * From Parts where DTS = @DTS and UserID = @UserID
-- <<< Copy Annotations >>>
INSERT INTO [Annotations] ([ItemID],[TypeID],[RtfText],[SearchText],[Config],[DTS],[UserID])
Select NewItemID, TypeID, RtfText, SearchText, Config, @DTS, @UserID
from Annotations AA Join @Children NN on AA.ItemID = NN.ItemID
--print 'E ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Annotations are done
-- SELECT * From Annotations where DTS = @DTS and UserID = @UserID
-- <<< Copy Documents and Entries>>>
-- logic to create Entries for Library Documents
INSERT INTO [Entries] ([ContentID],[DocID],[DTS],[UserID])
SELECT NN.[NewContentID],EE.[DocID],@DTS,@UserID
FROM [Entries] EE JOIN @Children NN on NN.ContentID = EE.ContentID
JOIN [Documents] DD on EE.[DocID] = DD.[DocID] and Isnull(LibTitle,'') <> ''
-- Logic to create new documents for any documents used that do not have libtitles
INSERT INTO [Documents] ([LibTitle],[DocContent],[DocAscii],[Config],[DTS],[UserID],[FileExtension])
OUTPUT CAST(INSERTED.[LibTitle] as INT),INSERTED.[DocID] INTO @NewDocuments
SELECT str(DD.[DocID]),[DocContent],[DocAscii],[Config],@DTS,@UserID,[FileExtension]
FROM [Entries] EE JOIN @Children NN on NN.ContentID = EE.ContentID
JOIN [Documents] DD on EE.[DocID] = DD.[DocID] and Isnull(LibTitle,'') = ''
UPDATE DD SET LibTitle = ''
FROM Documents DD JOIN @NewDocuments ND on DD.[DocID] = ND.[NewDocID]
where DTS = @DTS and UserID = @UserID
--print 'F ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Documents are Done
-- SELECT * From Documents where DTS = @DTS and UserID = @UserID
-- Logic to create entries for these newly created documents
INSERT INTO [Entries] ([ContentID],[DocID],[DTS],[UserID])
SELECT NN.[NewContentID],ND.[NewDocID],@DTS,@UserID
FROM [Entries] EE JOIN @Children NN on NN.ContentID = EE.ContentID
JOIN @NewDocuments ND on EE.[DocID] = ND.[DocID]
-- Logic to Create DROUsages for these newly created documents
INSERT INTO [DROUsages] ([DocID],[ROID],[Config],[DTS],[UserID],[RODbID])
SELECT ND.[NewDocID],[ROID],[Config],@DTS,@UserID,[RODbID]
FROM [DROUsages] RR
JOIN @NewDocuments ND on RR.[DocID] = ND.[DocID]
--print 'G ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Entries are done
-- SELECT * From Entries EE JOIN Documents DD on ee.DocID = DD.DocID where EE.DTS = @DTS and EE.UserID = @UserID
-- <<< Copy RoUsages >>>
INSERT INTO [RoUsages] ([ContentID],[ROID],[Config],[DTS],[UserID],[RODbID])
SELECT NN.[NewContentID],CAST([ROUsageID] as nvarchar(16)),[Config],@DTS,@UserID,[RODbID]
FROM [RoUsages] RR Join @Children NN on RR.ContentID = NN.ContentID
-- Update content records for newly copied records to use correct RO usage ids in the RO tags
DECLARE @RowsAffected int
SET @RowsAffected=1
WHILE @RowsAffected > 0
BEGIN
UPDATE CC SET [TEXT] = C2.NewText
FROM CONTENTS CC
JOIN (SELECT C1.ContentID, .dbo.vefn_FixROText(C1.Text, CAST([ROID] as int), [ROUsageID]) NewText
FROM CONTENTS C1
JOIN @Children NN on C1.ContentID = NN.NewContentID
JOIN RoUsages RO on NN.NewContentID = RO.ContentID where Len([ROID]) < 12) C2 ON CC.ContentID = C2.ContentID
WHERE [TEXT] <> C2.NewText
SET @RowsAffected = @@RowCount
END
-- Update grid records for newly copied records to use correct RO usage ids in the RO tags
SET @RowsAffected=1
WHILE @RowsAffected > 0
BEGIN
UPDATE GG SET [Data] = G2.NewData
FROM GRIDS GG
JOIN (SELECT G1.ContentID, .dbo.vefn_FixROData(G1.Data, CAST([ROID] as int), [ROUsageID]) NewData
FROM GRIDS G1
JOIN @Children NN on G1.ContentID = NN.NewContentID
JOIN RoUsages RO on NN.NewContentID = RO.ContentID where Len([ROID]) < 12) G2 ON GG.ContentID = G2.ContentID
WHERE Cast([Data] as nvarchar(max)) <> cast(G2.NewData as nvarchar(max))
SET @RowsAffected = @@RowCount
END
UPDATE RON SET [ROID] = ROO.[ROID]
FROM RoUsages RON
JOIN @Children NN on RON.ContentID = NN.NewContentID
JOIN RoUsages ROO on CAST(RON.ROID as int) = ROO.RoUsageID
where Len(RON.[ROID]) < 12
--print 'H ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- RoUsages are done
-- SELECT * From RoUsages where DTS = @DTS and UserID = @UserID
-- <<< Copy Transtions >>>
-- Note that the inserted record has the 'TranType' field set to old transitionid. This is done
-- so that the next step can replace the old transitionid with the new transitionid in the
-- content record's transition tokens. The TranType gets reset after the content records are
-- updated.
-- Also note that the 'toid/rangeid' may need converted to newly copied ids or may not. If it's
-- not a range, then it always is converted to new, if there is a new. If it's a range, both
-- the toid & the rangeid must be new in order for the conversion to be correct. You cannot
-- have part of the range pointing to the new and part of the range pointing to the original
-- locations.
INSERT INTO .[dbo].[Transitions] ([FromID],[ToID],[RangeID],[IsRange],[TranType],[Config],[DTS],[UserID])
SELECT NNF.[NewContentID],
-- if both toid & range are null, use the original toid & rangeid
CASE WHEN NNT.[NewItemID] is null or NNR.[NewItemID] is null THEN [ToID] ELSE NNT.[NewItemID] END,
CASE WHEN NNT.[NewItemID] is null or NNR.[NewItemID] is null THEN [RangeID] ELSE NNR.[NewItemID] END,
[IsRange],[TransitionID],[Config],@DTS,@UserID
FROM .[dbo].[Transitions] TT
JOIN @Children NNF on TT.[FromID] = NNF.[ContentID]
LEFT JOIN @Children NNT on TT.[ToID] = NNT.[ItemID]
LEFT JOIN @Children NNR on TT.[RangeID] = NNR.[ItemID]
--print 'H1 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- -- Update content records for newly copied records to use correct TransitionIDs in the Transition tags
SET @RowsAffected=1
WHILE @RowsAffected > 0
BEGIN
UPDATE CC SET [TEXT] = C2.NewText
FROM CONTENTS CC
JOIN (SELECT C1.ContentID, .dbo.vefn_FixTransitionTextForCopy(C1.Text, TRO.TransitionID, TRO.TranType, TRO.[ToID], TRO.[RangeID],TR.[TransitionID], TR.[ToID], TR.[RangeID], .dbo.vefn_GetNewTranType(NN.FormatID, NN.NewFormatID, TRO.TranType)) NewText
FROM CONTENTS C1
JOIN @Children NN on C1.ContentID = NN.NewContentID
JOIN Transitions TR on NN.NewContentID = TR.FromID
JOIN Transitions TRO on TR.TranType = TRO.TransitionID) C2 ON CC.ContentID = C2.ContentID
WHERE [TEXT] <> C2.NewText
SET @RowsAffected = @@RowCount
END
--print 'H2 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
--set nocount off
-- -- Update grid records for newly copied records to use correct TransitionIDs in the Transition tags
declare @grids table
(
contentid int primary key,
data xml
)
insert into @grids select gg.contentid,gg.data from GRIDS GG
where gg.contentid in (select nn.newcontentid from
@Children NN
JOIN Transitions TR on NN.NewContentID = TR.FromID
JOIN Transitions TRO on TR.TranType = TRO.TransitionID)
--print 'H2.1 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
--select * from @grids
SET @RowsAffected=1
WHILE @RowsAffected > 0
BEGIN
UPDATE GG SET [DATA] = G2.NewData
FROM @GRIDS GG
JOIN (SELECT G1.ContentID, .dbo.vefn_FixTransitionDataForCopy(G1.Data, TRO.TransitionID, TRO.TranType, TRO.[ToID], TRO.[RangeID],TR.[TransitionID], TR.[ToID], TR.[RangeID], .dbo.vefn_GetNewTranType(NN.FormatID, NN.NewFormatID, TRO.TranType)) NewData
FROM @GRIDS G1
JOIN @Children NN on G1.ContentID = NN.NewContentID
JOIN Transitions TR on NN.NewContentID = TR.FromID
JOIN Transitions TRO on TR.TranType = TRO.TransitionID) G2 ON GG.ContentID = G2.ContentID
WHERE Cast([DATA] as nvarchar(max)) <> CAST(G2.NewData as nvarchar(max))
SET @RowsAffected = @@RowCount
END
--print 'H2.2 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
update GG set data = g1.data from Grids gg join @grids g1 on gg.contentid = g1.contentid
--print 'H3 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
--set nocount on
-- Add 'Verification Required' AnnotationType
DECLARE @typeID int
SELECT @typeID = TypeID from AnnotationTypes where Name = 'Verification Required'
IF(@typeID IS NULL)
BEGIN
INSERT INTO [AnnotationTypes] ([Name],[UserID]) VALUES ('Verification Required','Volian')
SELECT @typeID = SCOPE_IDENTITY()
END
-- Add "Verification Required" Annotation for each Transition whose transition format changes
INSERT INTO [Annotations] ([ItemID],[TypeID],[SearchText],[UserID])
SELECT NN.NewItemID, @typeID,'Verify Transition Format',@UserID
FROM Transitions TR
JOIN @Children NN on TR.FromID = NN.NewContentID
JOIN Transitions TRO on TR.TranType = TRO.TransitionID
WHERE .dbo.vefn_CompareTranFormat(NN.FormatID, NN.NewFormatID, TRO.TranType) <> 0
--print 'H4 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
UPDATE TR SET TR.[TranType] = .dbo.vefn_GetNewTranType(NN.FormatID, NN.NewFormatID, TRO.TranType)
FROM Transitions TR
JOIN @Children NN on TR.FromID = NN.NewContentID
JOIN Transitions TRO on TR.TranType = TRO.TransitionID
--print 'H5 ' + cast(datediff(s,@dts,getdate()) as varchar(100))
-- Transitions are done
-- SELECT * From Transitions where DTS = @DTS and UserID = @UserID
--print 'Z ' + cast(datediff(s,@dts,getdate()) as varchar(100))
--foldouts fixing code
if exists (select * from contents where contentid in (select newcontentid from @children) and config like '%FloatingFoldout%')
begin
--insert into #mytemp
select cc.contentid,xsteps.value('@FloatingFoldout','int') oldfoldoutid,(select newitemid
from @children
where itemid = xsteps.value('@FloatingFoldout','int')) newfoldoutid,xconfig
into #mytemp
from (select *,cast(config as xml) xconfig from contents where contentid in (select newcontentid from @children)) cc
cross apply xconfig.nodes('Config/Step') tsteps(xsteps)
--build @cmd string
declare @cmd nvarchar(max)
declare cmds cursor for
select distinct 'update #mytemp set xconfig.modify(''replace value of (Config/Step/@FloatingFoldout)[1] with "'
+ cast(newfoldoutid as varchar(10))
+ '"'') where xconfig.value(''(Config/Step/@FloatingFoldout)[1]'',''int'') = '
+ cast(oldfoldoutid as varchar(10))
from #mytemp
--execute cursor over rows
open cmds
fetch next from cmds into @cmd
while @@fetch_status = 0
begin
exec sp_executesql @cmd
fetch next from cmds into @cmd
end
close cmds
deallocate cmds
--actually update contents
update cc set config = cast(xconfig as varchar(max)) from contents cc join #mytemp mt on cc.contentid = mt.contentid
--get rid of #mytemp
drop table #mytemp
end
--end foldouts fixing code
--section start
DECLARE @NewContentID int
Select @NewContentID = NewContentID from @Children where ItemID = @StartItemID
DECLARE @Config varchar(max)
DECLARE @XConfig xml
select @Config = config from contents where contentid = @NewContentID
select @XConfig = cast(@Config as xml)
if @Config like '%SectionStart%' begin
DECLARE @SectionStart int
select @SectionStart = xproc.value('@SectionStart','int') from @xconfig.nodes('Config/Procedure') tproc(xproc)
DECLARE @NewSectionStart int
select @NewSectionStart = newitemid from @children where itemid = @SectionStart
DECLARE @cmd2 nvarchar(max)
set @cmd2 = '
declare @XConfig xml;
set @XConfig = cast(''' + @Config + ''' as xml);
set @XConfig.modify(''replace value of (Config/Procedure/@SectionStart)[1] with "' + cast(@NewSectionStart as nvarchar(10)) + '"'');
update contents set config = cast(@XConfig as varchar(max)) where contentid = ' + cast(@NewContentID as nvarchar(10)) + ';'
exec sp_executesql @cmd2
end
--end section start
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
Go Go
IF (@@Error = 0) PRINT 'Procedure Creation: [CopyItemAndChildren] Succeeded'
ELSE PRINT 'Procedure Creation: [CopyItemAndChildren] Error on Creation'
GO
/* /*
========================================================================================================== ==========================================================================================================
End: C2024-004: KL - Update Copy Replace functionality, (remove ''copy of'') End: C2024-004: KL - Update Copy Replace functionality, (remove ''copy of'')
========================================================================================================== ==========================================================================================================
*/ */
/* /*
========================================================================================================== ==========================================================================================================
Begin: C2024-005: PRL - SPs to support Admin tool to clean Annotations Begin: C2024-005: PRL - SPs to support Admin tool to clean Annotations
@@ -22712,7 +23328,7 @@ AS
-- Delete Annotations -- Delete Annotations
DELETE FROM Ann DELETE FROM Ann
FROM tblAnnotations Ann INNER JOIN @Annotationitems AI ON Ann.itemid = AI.AllItemIDs WHERE TypeID = @typeidI beleive the FROM tblAnnotations Ann INNER JOIN @Annotationitems AI ON Ann.itemid = AI.AllItemIDs WHERE TypeID = @typeid
GO GO
@@ -22905,8 +23521,88 @@ GO
/*
==========================================================================================================
Start: C2021-059: SQL to delete folders using admin tool
==========================================================================================================
*/
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND name = 'deleteFolderAdmin')
DROP PROCEDURE [dbo].[deleteFolderAdmin]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[deleteFolderAdmin]
(
@FolderID int
)
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
DELETE From Assignments WHERE [FolderID]=@FolderID
DELETE From Associations where VersionID in (select versionid from DocVersions where folderid = @FolderID)
DELETE From DocVersions where VersionID in (select versionid from DocVersions where folderid= @FolderID)
DELETE From DocVersions where [FolderID]=@FolderID
-- Delete from items where ItemID matches
DELETE FROM tblitems
WHERE ItemID IN (
SELECT DISTINCT ItemID
FROM docversions
WHERE folderID = @folderID
);
-- Delete from items where ItemID matches
DELETE FROM tblitems
WHERE ItemID IN (
SELECT DISTINCT ItemID
FROM docversions
WHERE folderID = @folderID
);
-- Delete from tblContents where ContentID matches
DELETE FROM tblContents
WHERE ContentID IN (
SELECT DISTINCT c.ContentID
FROM tblContents c
JOIN items i ON c.ContentID = i.ItemID
WHERE i.ItemID IN (
SELECT DISTINCT ItemID
FROM docversions
WHERE folderID = @folderID
)
);
DELETE From Folders WHERE [ParentID] = @FolderID
DELETE From Folders WHERE [FolderID] = @FolderID
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
GO
/*
==========================================================================================================
End: C2021-059: SQL to delete folders using admin tool
==========================================================================================================
*/
-----------------------------------------------------------------------------
/* /*
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
| ADD New Code Before this Block | | ADD New Code Before this Block |
@@ -22940,8 +23636,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255) DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255) DECLARE @RevDescription varchar(255)
set @RevDate = '07/16/2024 5:00 PM' set @RevDate = '07/29/2024 11:24'
set @RevDescription = 'C2024-005: An Admin tool that can delete a group of annotations should be developed' set @RevDescription = 'C2021-059 Add SQL for Admin tool delete folders.'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
@@ -22959,6 +23655,3 @@ ELSE PRINT 'StoredProcedure [vesp_GetSQLCodeRevision] Error on Creation'
go go
Exec vesp_GetSQLCodeRevision; Exec vesp_GetSQLCodeRevision;

View File

@@ -1,3 +1,2 @@
C1.Win.C1Input.C1ComboBox, C1.Win.C1Input.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2
C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da C1.Win.C1SpellChecker.C1SpellChecker, C1.Win.C1SpellChecker.2
C1.Win.C1SpellChecker.C1SpellChecker, C1.Win.C1SpellChecker.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da

View File

@@ -56,9 +56,9 @@ namespace VEPROMS
this.lblAnnotationsList.AutoSize = true; this.lblAnnotationsList.AutoSize = true;
this.lblAnnotationsList.Location = new System.Drawing.Point(26, 21); this.lblAnnotationsList.Location = new System.Drawing.Point(26, 21);
this.lblAnnotationsList.Name = "lblAnnotationsList"; this.lblAnnotationsList.Name = "lblAnnotationsList";
this.lblAnnotationsList.Size = new System.Drawing.Size(169, 13); this.lblAnnotationsList.Size = new System.Drawing.Size(175, 13);
this.lblAnnotationsList.TabIndex = 1; this.lblAnnotationsList.TabIndex = 1;
this.lblAnnotationsList.Text = "Select a Annotation Type to Clean"; this.lblAnnotationsList.Text = "Select an Annotation Type to Clean";
// //
// btnClean // btnClean
// //
@@ -73,11 +73,12 @@ namespace VEPROMS
// lblCountNumber // lblCountNumber
// //
this.lblCountNumber.AutoSize = true; this.lblCountNumber.AutoSize = true;
this.lblCountNumber.Location = new System.Drawing.Point(392, 100); this.lblCountNumber.Location = new System.Drawing.Point(395, 100);
this.lblCountNumber.Name = "lblCountNumber"; this.lblCountNumber.Name = "lblCountNumber";
this.lblCountNumber.Size = new System.Drawing.Size(69, 13); this.lblCountNumber.Size = new System.Drawing.Size(69, 13);
this.lblCountNumber.TabIndex = 3; this.lblCountNumber.TabIndex = 3;
this.lblCountNumber.Text = "Delete Count"; this.lblCountNumber.Text = "Delete Count";
this.lblCountNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// lblCount // lblCount
// //

View File

@@ -129,6 +129,7 @@ namespace VEPROMS
// Retrieve number of annotations that will be deleted. // Retrieve number of annotations that will be deleted.
private void lbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e) private void lbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e)
{ {
btnClean.Enabled = false;
lblCountNumber.Text = ""; lblCountNumber.Text = "";
int deletecountProc = 0; int deletecountProc = 0;
int deletecountDocv = 0; int deletecountDocv = 0;
@@ -144,6 +145,7 @@ namespace VEPROMS
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, getAnnotationDocvItems(dvil2)); deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, getAnnotationDocvItems(dvil2));
} }
lblCountNumber.Text = (deletecountProc + deletecountDocv).ToString(); lblCountNumber.Text = (deletecountProc + deletecountDocv).ToString();
btnClean.Enabled = true;
} }
// Close form. // Close form.

View File

@@ -120,5 +120,4 @@
<metadata name="itemAnnotationsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="itemAnnotationsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
</root> </root>

View File

@@ -59,6 +59,17 @@
this.labelX14 = new DevComponents.DotNetBar.LabelX(); this.labelX14 = new DevComponents.DotNetBar.LabelX();
this.myTVdel = new System.Windows.Forms.TreeView(); this.myTVdel = new System.Windows.Forms.TreeView();
this.btnDeleteItems = new DevComponents.DotNetBar.ButtonX(); this.btnDeleteItems = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel3 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.swCheckROLinks = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX12 = new DevComponents.DotNetBar.LabelX();
this.warningBox5 = new DevComponents.DotNetBar.Controls.WarningBox();
this.line3 = new DevComponents.DotNetBar.Controls.Line();
this.swUpdateROVals = new DevComponents.DotNetBar.Controls.SwitchButton();
this.swRefreshTrans = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX11 = new DevComponents.DotNetBar.LabelX();
this.labelX6 = new DevComponents.DotNetBar.LabelX();
this.warningBox1 = new DevComponents.DotNetBar.Controls.WarningBox();
this.btnFixLinks = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel1 = new DevComponents.DotNetBar.Controls.SideNavPanel(); this.sideNavPanel1 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.warningBox3 = new DevComponents.DotNetBar.Controls.WarningBox(); this.warningBox3 = new DevComponents.DotNetBar.Controls.WarningBox();
this.labelX7 = new DevComponents.DotNetBar.LabelX(); this.labelX7 = new DevComponents.DotNetBar.LabelX();
@@ -86,17 +97,8 @@
this.labelX8 = new DevComponents.DotNetBar.LabelX(); this.labelX8 = new DevComponents.DotNetBar.LabelX();
this.line2 = new DevComponents.DotNetBar.Controls.Line(); this.line2 = new DevComponents.DotNetBar.Controls.Line();
this.btnRunRepair = new DevComponents.DotNetBar.ButtonX(); this.btnRunRepair = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel3 = new DevComponents.DotNetBar.Controls.SideNavPanel(); this.sideNavPanel5 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.swCheckROLinks = new DevComponents.DotNetBar.Controls.SwitchButton(); this.btn_ShowUsers = new DevComponents.DotNetBar.ButtonX();
this.labelX12 = new DevComponents.DotNetBar.LabelX();
this.warningBox5 = new DevComponents.DotNetBar.Controls.WarningBox();
this.line3 = new DevComponents.DotNetBar.Controls.Line();
this.swUpdateROVals = new DevComponents.DotNetBar.Controls.SwitchButton();
this.swRefreshTrans = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX11 = new DevComponents.DotNetBar.LabelX();
this.labelX6 = new DevComponents.DotNetBar.LabelX();
this.warningBox1 = new DevComponents.DotNetBar.Controls.WarningBox();
this.btnFixLinks = new DevComponents.DotNetBar.ButtonX();
this.sideNavItem1 = new DevComponents.DotNetBar.Controls.SideNavItem(); this.sideNavItem1 = new DevComponents.DotNetBar.Controls.SideNavItem();
this.separator1 = new DevComponents.DotNetBar.Separator(); this.separator1 = new DevComponents.DotNetBar.Separator();
this.sideNavItmCheck = new DevComponents.DotNetBar.Controls.SideNavItem(); this.sideNavItmCheck = new DevComponents.DotNetBar.Controls.SideNavItem();
@@ -126,21 +128,23 @@
this.panelEx1.SuspendLayout(); this.panelEx1.SuspendLayout();
this.sideNav1.SuspendLayout(); this.sideNav1.SuspendLayout();
this.sideNavPanel4.SuspendLayout(); this.sideNavPanel4.SuspendLayout();
this.sideNavPanel3.SuspendLayout();
this.sideNavPanel1.SuspendLayout(); this.sideNavPanel1.SuspendLayout();
this.sideNavPanel2.SuspendLayout(); this.sideNavPanel2.SuspendLayout();
this.sideNavPanel3.SuspendLayout(); this.sideNavPanel5.SuspendLayout();
this.panelEx4.SuspendLayout(); this.panelEx4.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// myTV // myTV
// //
this.myTV.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.myTV.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.myTV.CheckBoxes = true; this.myTV.CheckBoxes = true;
this.myTV.Location = new System.Drawing.Point(0, 230); this.myTV.Dock = System.Windows.Forms.DockStyle.Bottom;
this.myTV.Location = new System.Drawing.Point(0, 184);
this.myTV.Name = "myTV"; this.myTV.Name = "myTV";
this.myTV.Size = new System.Drawing.Size(183, 226); this.myTV.Size = new System.Drawing.Size(291, 310);
this.myTV.TabIndex = 4; this.myTV.TabIndex = 4;
this.myTV.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck); this.myTV.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck);
// //
@@ -367,8 +371,8 @@
// //
// dtpTime // dtpTime
// //
this.dtpTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.dtpTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.dtpTime.CustomFormat = "HH:mm"; this.dtpTime.CustomFormat = "HH:mm";
this.dtpTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dtpTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpTime.Location = new System.Drawing.Point(129, 9); this.dtpTime.Location = new System.Drawing.Point(129, 9);
@@ -465,21 +469,22 @@
// //
this.sideNav1.BackColor = System.Drawing.SystemColors.Control; this.sideNav1.BackColor = System.Drawing.SystemColors.Control;
this.sideNav1.Controls.Add(this.sideNavPanel4); this.sideNav1.Controls.Add(this.sideNavPanel4);
this.sideNav1.Controls.Add(this.sideNavPanel3);
this.sideNav1.Controls.Add(this.sideNavPanel1); this.sideNav1.Controls.Add(this.sideNavPanel1);
this.sideNav1.Controls.Add(this.sideNavPanel2); this.sideNav1.Controls.Add(this.sideNavPanel2);
this.sideNav1.Controls.Add(this.sideNavPanel3); this.sideNav1.Controls.Add(this.sideNavPanel5);
this.sideNav1.Dock = System.Windows.Forms.DockStyle.Fill; this.sideNav1.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNav1.EnableClose = false; this.sideNav1.EnableClose = false;
this.sideNav1.EnableMaximize = false; this.sideNav1.EnableMaximize = false;
this.sideNav1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.sideNav1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.sideNavItem1, this.sideNavItem1,
this.separator1, this.separator1,
this.sideNavItmCheck, this.sideNavItmCheck,
this.sideNavItmRepair, this.sideNavItmRepair,
this.sideNavItmLinks, this.sideNavItmLinks,
this.sideNavItmUsers, this.sideNavItmUsers,
this.sideNavItmDelete, this.sideNavItmDelete,
this.sideNavItmExit}); this.sideNavItmExit});
this.sideNav1.Location = new System.Drawing.Point(0, 0); this.sideNav1.Location = new System.Drawing.Point(0, 0);
this.sideNav1.Name = "sideNav1"; this.sideNav1.Name = "sideNav1";
this.sideNav1.Padding = new System.Windows.Forms.Padding(1); this.sideNav1.Padding = new System.Windows.Forms.Padding(1);
@@ -500,6 +505,31 @@
this.sideNavPanel4.Name = "sideNavPanel4"; this.sideNavPanel4.Name = "sideNavPanel4";
this.sideNavPanel4.Size = new System.Drawing.Size(291, 494); this.sideNavPanel4.Size = new System.Drawing.Size(291, 494);
this.sideNavPanel4.TabIndex = 27; this.sideNavPanel4.TabIndex = 27;
//
// sideNavPanel5
//
this.sideNavPanel5.Controls.Add(this.btn_ShowUsers);
this.sideNavPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel5.Location = new System.Drawing.Point(81, 31);
this.sideNavPanel5.Name = "sideNavPanel5";
this.sideNavPanel5.Size = new System.Drawing.Size(299, 494);
this.sideNavPanel5.TabIndex = 14;
this.sideNavPanel5.Visible = false;
//
// btn_ShowUsers
//
this.btn_ShowUsers.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btn_ShowUsers.Checked = true;
this.btn_ShowUsers.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btn_ShowUsers.Location = new System.Drawing.Point(57, 37);
this.btn_ShowUsers.Name = "btn_ShowUsers";
this.btn_ShowUsers.Size = new System.Drawing.Size(171, 23);
this.btn_ShowUsers.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btn_ShowUsers, new DevComponents.DotNetBar.SuperTooltipInfo("Show Users", "", "This will return all of the users currently with open sessions in the database an" +
"d the details of any items they have checked out.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 80)));
this.btn_ShowUsers.TabIndex = 0;
this.btn_ShowUsers.Text = "Show Users";
this.btn_ShowUsers.Click += new System.EventHandler(this.btn_ShowUsers_Click);
// //
// swDeleteFolder // swDeleteFolder
// //
@@ -561,37 +591,204 @@
this.labelX14.Location = new System.Drawing.Point(85, 14); this.labelX14.Location = new System.Drawing.Point(85, 14);
this.labelX14.Name = "labelX14"; this.labelX14.Name = "labelX14";
this.labelX14.Size = new System.Drawing.Size(186, 22); this.labelX14.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX14, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Transitions", "", resources.GetString("labelX14.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(256, 175))); this.superTooltip1.SetSuperTooltip(this.labelX14, new DevComponents.DotNetBar.SuperTooltipInfo("Process Deletions", "", resources.GetString("labelX14.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
this.labelX14.TabIndex = 36; this.labelX14.TabIndex = 36;
this.labelX14.Text = "Delete Annotations"; this.labelX14.Text = "Delete Annotations";
// //
// myTVdel // myTVdel
// //
this.myTVdel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.myTVdel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.myTVdel.CheckBoxes = true; this.myTVdel.CheckBoxes = true;
this.myTVdel.Location = new System.Drawing.Point(14, 145); this.myTVdel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.myTVdel.Location = new System.Drawing.Point(0, 127);
this.myTVdel.Name = "myTVdel"; this.myTVdel.Name = "myTVdel";
this.myTVdel.Size = new System.Drawing.Size(267, 331); this.myTVdel.Size = new System.Drawing.Size(291, 367);
this.myTVdel.TabIndex = 34; this.myTVdel.TabIndex = 34;
// //
// btnDeleteItems // btnDeleteItems
// //
this.btnDeleteItems.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnDeleteItems.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnDeleteItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDeleteItems.Checked = true; this.btnDeleteItems.Checked = true;
this.btnDeleteItems.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnDeleteItems.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnDeleteItems.Location = new System.Drawing.Point(3, 98); this.btnDeleteItems.Location = new System.Drawing.Point(39, 98);
this.btnDeleteItems.Name = "btnDeleteItems"; this.btnDeleteItems.Name = "btnDeleteItems";
this.btnDeleteItems.Size = new System.Drawing.Size(280, 23); this.btnDeleteItems.Size = new System.Drawing.Size(212, 23);
this.btnDeleteItems.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnDeleteItems.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnDeleteItems, new DevComponents.DotNetBar.SuperTooltipInfo("Process Links", "", "This will run the selected RO Links or Transitions Links tool.\r\n\r\nClick on the on" + this.superTooltip1.SetSuperTooltip(this.btnDeleteItems, new DevComponents.DotNetBar.SuperTooltipInfo("Process Deletions", "", "This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete.\r\n\r\nClick on the on" +
"/off switches to turn on/off each tool.\r\n\r\nNote that only one of these tools can" + "/off switches to turn on/off each tool.\r\n\r\nNote that only one of these tools can" +
" be run at a time.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 130))); " be run at a time.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
this.btnDeleteItems.TabIndex = 35; this.btnDeleteItems.TabIndex = 35;
this.btnDeleteItems.Text = "Process Deletions"; this.btnDeleteItems.Text = "Process Deletions";
this.btnDeleteItems.Click += new System.EventHandler(this.btnDeleteItems_Click); this.btnDeleteItems.Click += new System.EventHandler(this.btnDeleteItems_Click);
// //
// sideNavPanel3
//
this.sideNavPanel3.Controls.Add(this.swCheckROLinks);
this.sideNavPanel3.Controls.Add(this.labelX12);
this.sideNavPanel3.Controls.Add(this.warningBox5);
this.sideNavPanel3.Controls.Add(this.line3);
this.sideNavPanel3.Controls.Add(this.swUpdateROVals);
this.sideNavPanel3.Controls.Add(this.swRefreshTrans);
this.sideNavPanel3.Controls.Add(this.labelX11);
this.sideNavPanel3.Controls.Add(this.labelX6);
this.sideNavPanel3.Controls.Add(this.warningBox1);
this.sideNavPanel3.Controls.Add(this.myTV);
this.sideNavPanel3.Controls.Add(this.btnFixLinks);
this.sideNavPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel3.Location = new System.Drawing.Point(89, 31);
this.sideNavPanel3.Name = "sideNavPanel3";
this.sideNavPanel3.Size = new System.Drawing.Size(291, 494);
this.sideNavPanel3.TabIndex = 10;
this.sideNavPanel3.Visible = false;
//
// swCheckROLinks
//
//
//
//
this.swCheckROLinks.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swCheckROLinks.Location = new System.Drawing.Point(10, 66);
this.swCheckROLinks.Name = "swCheckROLinks";
this.swCheckROLinks.Size = new System.Drawing.Size(91, 22);
this.swCheckROLinks.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swCheckROLinks, new DevComponents.DotNetBar.SuperTooltipInfo("Check RO Links", "", resources.GetString("swCheckROLinks.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.swCheckROLinks.SwitchClickTogglesValue = true;
this.swCheckROLinks.TabIndex = 33;
this.swCheckROLinks.ValueChanged += new System.EventHandler(this.swCheckROLinks_ValueChanged);
//
// labelX12
//
this.labelX12.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX12.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX12.Location = new System.Drawing.Point(107, 66);
this.labelX12.Name = "labelX12";
this.labelX12.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX12, new DevComponents.DotNetBar.SuperTooltipInfo("Check RO Links", "", resources.GetString("labelX12.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(350, 175)));
this.labelX12.TabIndex = 32;
this.labelX12.Text = "Check RO Links";
//
// warningBox5
//
this.warningBox5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
this.warningBox5.CloseButtonVisible = false;
this.warningBox5.Image = ((System.Drawing.Image)(resources.GetObject("warningBox5.Image")));
this.warningBox5.Location = new System.Drawing.Point(17, 145);
this.warningBox5.Margin = new System.Windows.Forms.Padding(4);
this.warningBox5.Name = "warningBox5";
this.warningBox5.OptionsButtonVisible = false;
this.warningBox5.Size = new System.Drawing.Size(262, 32);
this.warningBox5.TabIndex = 31;
this.warningBox5.Text = "<b>NOTE</b> These tools can take a long time to run";
//
// line3
//
this.line3.BackColor = System.Drawing.Color.Transparent;
this.line3.Location = new System.Drawing.Point(6, 127);
this.line3.Name = "line3";
this.line3.Size = new System.Drawing.Size(285, 12);
this.line3.TabIndex = 30;
this.line3.Text = "line3";
//
// swUpdateROVals
//
//
//
//
this.swUpdateROVals.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swUpdateROVals.Location = new System.Drawing.Point(10, 10);
this.swUpdateROVals.Name = "swUpdateROVals";
this.swUpdateROVals.Size = new System.Drawing.Size(91, 22);
this.swUpdateROVals.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swUpdateROVals, new DevComponents.DotNetBar.SuperTooltipInfo("Update RO Values", "", resources.GetString("swUpdateROVals.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.swUpdateROVals.SwitchClickTogglesValue = true;
this.swUpdateROVals.TabIndex = 29;
this.swUpdateROVals.Value = true;
this.swUpdateROVals.ValueObject = "Y";
this.swUpdateROVals.ValueChanged += new System.EventHandler(this.swUpdateROVals_ValueChanged);
//
// swRefreshTrans
//
//
//
//
this.swRefreshTrans.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swRefreshTrans.Location = new System.Drawing.Point(10, 38);
this.swRefreshTrans.Name = "swRefreshTrans";
this.swRefreshTrans.Size = new System.Drawing.Size(91, 22);
this.swRefreshTrans.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swRefreshTrans, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Transitions", "", resources.GetString("swRefreshTrans.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(265, 175)));
this.swRefreshTrans.SwitchClickTogglesValue = true;
this.swRefreshTrans.TabIndex = 29;
this.swRefreshTrans.ValueChanged += new System.EventHandler(this.swRefreshTrans_ValueChanged);
//
// labelX11
//
this.labelX11.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX11.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX11.Location = new System.Drawing.Point(107, 10);
this.labelX11.Name = "labelX11";
this.labelX11.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX11, new DevComponents.DotNetBar.SuperTooltipInfo("Update RO Values", "", resources.GetString("labelX11.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.labelX11.TabIndex = 28;
this.labelX11.Text = "Update RO Values";
//
// labelX6
//
this.labelX6.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX6.Location = new System.Drawing.Point(107, 38);
this.labelX6.Name = "labelX6";
this.labelX6.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX6, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Transitions", "", resources.GetString("labelX6.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(256, 175)));
this.labelX6.TabIndex = 28;
this.labelX6.Text = "Refresh Transitions";
//
// warningBox1
//
this.warningBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
this.warningBox1.CloseButtonVisible = false;
this.warningBox1.Image = ((System.Drawing.Image)(resources.GetObject("warningBox1.Image")));
this.warningBox1.Location = new System.Drawing.Point(17, 181);
this.warningBox1.Margin = new System.Windows.Forms.Padding(4);
this.warningBox1.Name = "warningBox1";
this.warningBox1.OptionsButtonVisible = false;
this.warningBox1.Size = new System.Drawing.Size(262, 43);
this.warningBox1.TabIndex = 7;
this.warningBox1.Text = " Be sure there is a current backup of the \r\n database prior to running these func" +
"tions";
//
// btnFixLinks
//
this.btnFixLinks.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnFixLinks.Checked = true;
this.btnFixLinks.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnFixLinks.Location = new System.Drawing.Point(10, 98);
this.btnFixLinks.Name = "btnFixLinks";
this.btnFixLinks.Size = new System.Drawing.Size(280, 23);
this.btnFixLinks.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnFixLinks, new DevComponents.DotNetBar.SuperTooltipInfo("Process Links", "", "This will run the selected RO Links or Transitions Links tool.\r\n\r\nClick on the on" +
"/off switches to turn on/off each tool.\r\n\r\nNote that only one of these tools can" +
" be run at a time.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 130)));
this.btnFixLinks.TabIndex = 6;
this.btnFixLinks.Text = "Process Links";
this.btnFixLinks.Click += new System.EventHandler(this.btnFixLinks_Click);
//
// sideNavPanel1 // sideNavPanel1
// //
this.sideNavPanel1.Controls.Add(this.warningBox3); this.sideNavPanel1.Controls.Add(this.warningBox3);
@@ -754,7 +951,7 @@
this.btnRunCheck.Size = new System.Drawing.Size(286, 23); this.btnRunCheck.Size = new System.Drawing.Size(286, 23);
this.btnRunCheck.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRunCheck.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnRunCheck, new DevComponents.DotNetBar.SuperTooltipInfo("Run Check", "", "This will run the database check tools selected.\r\n\r\nClick on the on/off switches " + this.superTooltip1.SetSuperTooltip(this.btnRunCheck, new DevComponents.DotNetBar.SuperTooltipInfo("Run Check", "", "This will run the database check tools selected.\r\n\r\nClick on the on/off switches " +
"to turn on/off each tool.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 100))); "to turn on/off each tool.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 100)));
this.btnRunCheck.TabIndex = 7; this.btnRunCheck.TabIndex = 7;
this.btnRunCheck.Text = "Run Check"; this.btnRunCheck.Text = "Run Check";
this.btnRunCheck.Click += new System.EventHandler(this.btnRunCheck_Click); this.btnRunCheck.Click += new System.EventHandler(this.btnRunCheck_Click);
@@ -840,7 +1037,7 @@
this.warningBox2.Size = new System.Drawing.Size(264, 43); this.warningBox2.Size = new System.Drawing.Size(264, 43);
this.warningBox2.TabIndex = 28; this.warningBox2.TabIndex = 28;
this.warningBox2.Text = " Be sure there is a current backup of the \r\n database prior to running these func" + this.warningBox2.Text = " Be sure there is a current backup of the \r\n database prior to running these func" +
"tions"; "tions";
// //
// swRmObsoleteROData // swRmObsoleteROData
// //
@@ -1004,175 +1201,11 @@
this.btnRunRepair.Size = new System.Drawing.Size(280, 23); this.btnRunRepair.Size = new System.Drawing.Size(280, 23);
this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnRunRepair, new DevComponents.DotNetBar.SuperTooltipInfo("Run Repair", "", "This will run the database repair tools selected.\r\n\r\nClick on the on/off switches" + this.superTooltip1.SetSuperTooltip(this.btnRunRepair, new DevComponents.DotNetBar.SuperTooltipInfo("Run Repair", "", "This will run the database repair tools selected.\r\n\r\nClick on the on/off switches" +
" to turn on/off each tool.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 103))); " to turn on/off each tool.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 103)));
this.btnRunRepair.TabIndex = 3; this.btnRunRepair.TabIndex = 3;
this.btnRunRepair.Text = "Run Repair"; this.btnRunRepair.Text = "Run Repair";
this.btnRunRepair.Click += new System.EventHandler(this.btnRunRepair_Click); this.btnRunRepair.Click += new System.EventHandler(this.btnRunRepair_Click);
// //
// sideNavPanel3
//
this.sideNavPanel3.Controls.Add(this.swCheckROLinks);
this.sideNavPanel3.Controls.Add(this.labelX12);
this.sideNavPanel3.Controls.Add(this.warningBox5);
this.sideNavPanel3.Controls.Add(this.line3);
this.sideNavPanel3.Controls.Add(this.swUpdateROVals);
this.sideNavPanel3.Controls.Add(this.swRefreshTrans);
this.sideNavPanel3.Controls.Add(this.labelX11);
this.sideNavPanel3.Controls.Add(this.labelX6);
this.sideNavPanel3.Controls.Add(this.warningBox1);
this.sideNavPanel3.Controls.Add(this.myTV);
this.sideNavPanel3.Controls.Add(this.btnFixLinks);
this.sideNavPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel3.Location = new System.Drawing.Point(89, 31);
this.sideNavPanel3.Name = "sideNavPanel3";
this.sideNavPanel3.Size = new System.Drawing.Size(291, 494);
this.sideNavPanel3.TabIndex = 10;
this.sideNavPanel3.Visible = false;
//
// swCheckROLinks
//
//
//
//
this.swCheckROLinks.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swCheckROLinks.Location = new System.Drawing.Point(10, 66);
this.swCheckROLinks.Name = "swCheckROLinks";
this.swCheckROLinks.Size = new System.Drawing.Size(91, 22);
this.swCheckROLinks.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swCheckROLinks, new DevComponents.DotNetBar.SuperTooltipInfo("Check RO Links", "", resources.GetString("swCheckROLinks.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.swCheckROLinks.SwitchClickTogglesValue = true;
this.swCheckROLinks.TabIndex = 33;
this.swCheckROLinks.ValueChanged += new System.EventHandler(this.swCheckROLinks_ValueChanged);
//
// labelX12
//
this.labelX12.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX12.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX12.Location = new System.Drawing.Point(107, 66);
this.labelX12.Name = "labelX12";
this.labelX12.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX12, new DevComponents.DotNetBar.SuperTooltipInfo("Check RO Links", "", resources.GetString("labelX12.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(350, 175)));
this.labelX12.TabIndex = 32;
this.labelX12.Text = "Check RO Links";
//
// warningBox5
//
this.warningBox5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
this.warningBox5.CloseButtonVisible = false;
this.warningBox5.Image = ((System.Drawing.Image)(resources.GetObject("warningBox5.Image")));
this.warningBox5.Location = new System.Drawing.Point(17, 145);
this.warningBox5.Margin = new System.Windows.Forms.Padding(4);
this.warningBox5.Name = "warningBox5";
this.warningBox5.OptionsButtonVisible = false;
this.warningBox5.Size = new System.Drawing.Size(262, 32);
this.warningBox5.TabIndex = 31;
this.warningBox5.Text = "<b>NOTE</b> These tools can take a long time to run";
//
// line3
//
this.line3.BackColor = System.Drawing.Color.Transparent;
this.line3.Location = new System.Drawing.Point(6, 127);
this.line3.Name = "line3";
this.line3.Size = new System.Drawing.Size(285, 12);
this.line3.TabIndex = 30;
this.line3.Text = "line3";
//
// swUpdateROVals
//
//
//
//
this.swUpdateROVals.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swUpdateROVals.Location = new System.Drawing.Point(10, 10);
this.swUpdateROVals.Name = "swUpdateROVals";
this.swUpdateROVals.Size = new System.Drawing.Size(91, 22);
this.swUpdateROVals.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swUpdateROVals, new DevComponents.DotNetBar.SuperTooltipInfo("Update RO Values", "", resources.GetString("swUpdateROVals.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.swUpdateROVals.SwitchClickTogglesValue = true;
this.swUpdateROVals.TabIndex = 29;
this.swUpdateROVals.Value = true;
this.swUpdateROVals.ValueObject = "Y";
this.swUpdateROVals.ValueChanged += new System.EventHandler(this.swUpdateROVals_ValueChanged);
//
// swRefreshTrans
//
//
//
//
this.swRefreshTrans.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swRefreshTrans.Location = new System.Drawing.Point(10, 38);
this.swRefreshTrans.Name = "swRefreshTrans";
this.swRefreshTrans.Size = new System.Drawing.Size(91, 22);
this.swRefreshTrans.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swRefreshTrans, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Transitions", "", resources.GetString("swRefreshTrans.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(265, 175)));
this.swRefreshTrans.SwitchClickTogglesValue = true;
this.swRefreshTrans.TabIndex = 29;
this.swRefreshTrans.ValueChanged += new System.EventHandler(this.swRefreshTrans_ValueChanged);
//
// labelX11
//
this.labelX11.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX11.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX11.Location = new System.Drawing.Point(107, 10);
this.labelX11.Name = "labelX11";
this.labelX11.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX11, new DevComponents.DotNetBar.SuperTooltipInfo("Update RO Values", "", resources.GetString("labelX11.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.labelX11.TabIndex = 28;
this.labelX11.Text = "Update RO Values";
//
// labelX6
//
this.labelX6.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX6.Location = new System.Drawing.Point(107, 38);
this.labelX6.Name = "labelX6";
this.labelX6.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX6, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Transitions", "", resources.GetString("labelX6.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(256, 175)));
this.labelX6.TabIndex = 28;
this.labelX6.Text = "Refresh Transitions";
//
// warningBox1
//
this.warningBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
this.warningBox1.CloseButtonVisible = false;
this.warningBox1.Image = ((System.Drawing.Image)(resources.GetObject("warningBox1.Image")));
this.warningBox1.Location = new System.Drawing.Point(17, 181);
this.warningBox1.Margin = new System.Windows.Forms.Padding(4);
this.warningBox1.Name = "warningBox1";
this.warningBox1.OptionsButtonVisible = false;
this.warningBox1.Size = new System.Drawing.Size(262, 43);
this.warningBox1.TabIndex = 7;
this.warningBox1.Text = " Be sure there is a current backup of the \r\n database prior to running these func" +
"tions";
//
// btnFixLinks
//
this.btnFixLinks.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnFixLinks.Checked = true;
this.btnFixLinks.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnFixLinks.Location = new System.Drawing.Point(10, 98);
this.btnFixLinks.Name = "btnFixLinks";
this.btnFixLinks.Size = new System.Drawing.Size(280, 23);
this.btnFixLinks.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnFixLinks, new DevComponents.DotNetBar.SuperTooltipInfo("Process Links", "", "This will run the selected RO Links or Transitions Links tool.\r\n\r\nClick on the on" +
"/off switches to turn on/off each tool.\r\n\r\nNote that only one of these tools can" +
" be run at a time.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 130)));
this.btnFixLinks.TabIndex = 6;
this.btnFixLinks.Text = "Process Links";
this.btnFixLinks.Click += new System.EventHandler(this.btnFixLinks_Click);
//
// sideNavItem1 // sideNavItem1
// //
this.sideNavItem1.IsSystemMenu = true; this.sideNavItem1.IsSystemMenu = true;
@@ -1217,8 +1250,7 @@
// sideNavItmUsers // sideNavItmUsers
// //
this.sideNavItmUsers.Name = "sideNavItmUsers"; this.sideNavItmUsers.Name = "sideNavItmUsers";
this.sideNavItmUsers.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.sideNavItmUsers.Panel = this.sideNavPanel5;
this.buttonItem1});
this.sideNavItmUsers.Symbol = ""; this.sideNavItmUsers.Symbol = "";
this.sideNavItmUsers.Text = "Users"; this.sideNavItmUsers.Text = "Users";
this.sideNavItmUsers.Click += new System.EventHandler(this.sideNavItmUsers_Click); this.sideNavItmUsers.Click += new System.EventHandler(this.sideNavItmUsers_Click);
@@ -1277,10 +1309,10 @@
this.progressSteps1.ContainerControlProcessDialogKey = true; this.progressSteps1.ContainerControlProcessDialogKey = true;
this.progressSteps1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.progressSteps1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.progressSteps1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.progressSteps1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.stepItem1, this.stepItem1,
this.stepItem2, this.stepItem2,
this.stepItem3, this.stepItem3,
this.stepItem4}); this.stepItem4});
this.progressSteps1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; this.progressSteps1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
this.progressSteps1.Location = new System.Drawing.Point(123, 18); this.progressSteps1.Location = new System.Drawing.Point(123, 18);
this.progressSteps1.Name = "progressSteps1"; this.progressSteps1.Name = "progressSteps1";
@@ -1364,9 +1396,10 @@
this.sideNav1.ResumeLayout(false); this.sideNav1.ResumeLayout(false);
this.sideNav1.PerformLayout(); this.sideNav1.PerformLayout();
this.sideNavPanel4.ResumeLayout(false); this.sideNavPanel4.ResumeLayout(false);
this.sideNavPanel3.ResumeLayout(false);
this.sideNavPanel1.ResumeLayout(false); this.sideNavPanel1.ResumeLayout(false);
this.sideNavPanel2.ResumeLayout(false); this.sideNavPanel2.ResumeLayout(false);
this.sideNavPanel3.ResumeLayout(false); this.sideNavPanel5.ResumeLayout(false);
this.panelEx4.ResumeLayout(false); this.panelEx4.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
@@ -1416,6 +1449,8 @@
private DevComponents.DotNetBar.LabelX labelX8; private DevComponents.DotNetBar.LabelX labelX8;
private DevComponents.DotNetBar.Controls.Line line2; private DevComponents.DotNetBar.Controls.Line line2;
private DevComponents.DotNetBar.ButtonX btnRunRepair; private DevComponents.DotNetBar.ButtonX btnRunRepair;
private DevComponents.DotNetBar.Controls.SideNavPanel sideNavPanel5;
private DevComponents.DotNetBar.ButtonX btn_ShowUsers;
private DevComponents.DotNetBar.Controls.SideNavPanel sideNavPanel3; private DevComponents.DotNetBar.Controls.SideNavPanel sideNavPanel3;
private DevComponents.DotNetBar.ButtonX btnFixLinks; private DevComponents.DotNetBar.ButtonX btnFixLinks;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItem1; private DevComponents.DotNetBar.Controls.SideNavItem sideNavItem1;
@@ -1460,6 +1495,4 @@
private DevComponents.DotNetBar.ButtonX btnDeleteItems; private DevComponents.DotNetBar.ButtonX btnDeleteItems;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmDelete; private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmDelete;
} }
} }

View File

@@ -24,16 +24,23 @@ namespace VEPROMS
private bool IsAdministratorUser = false; //C2020-035 used to control what Set Amins can do private bool IsAdministratorUser = false; //C2020-035 used to control what Set Amins can do
// C2017-030 - new Admin Tools user interface // C2017-030 - new Admin Tools user interface
// pass in session info to constructor // pass in session info to constructor
public frmBatchRefresh(SessionInfo sessionInfo)
private frmVEPROMS _veProms;
public frmBatchRefresh(SessionInfo sessionInfo, frmVEPROMS veProms)
{ {
InitializeComponent(); InitializeComponent();
_MySessionInfo = sessionInfo; _MySessionInfo = sessionInfo;
_veProms = veProms;
if (sideNavItmDelete.Checked) if (sideNavItmDelete.Checked)
{ {
AdminToolType = (E_AdminToolType)4; AdminToolType = (E_AdminToolType)4;
if (swDeleteFolder.Value) if (swDeleteFolder.Value)
{
ResetDelTV(true); ResetDelTV(true);
setupProgessSteps1();
}
else else
ResetDelTV(false); ResetDelTV(false);
} }
@@ -91,6 +98,7 @@ namespace VEPROMS
private Dictionary<TreeNode, ProcedureInfo> myProcedures = new Dictionary<TreeNode, ProcedureInfo>(); private Dictionary<TreeNode, ProcedureInfo> myProcedures = new Dictionary<TreeNode, ProcedureInfo>();
private Dictionary<TreeNode, DocVersionInfo> myDocVersions = new Dictionary<TreeNode, DocVersionInfo>(); private Dictionary<TreeNode, DocVersionInfo> myDocVersions = new Dictionary<TreeNode, DocVersionInfo>();
private Dictionary<TreeNode, FolderInfo> myFolders = new Dictionary<TreeNode, FolderInfo>();
private void frmBatchRefresh_Load(object sender, EventArgs e) private void frmBatchRefresh_Load(object sender, EventArgs e)
{ {
IsClosing = false;//B2017-221 Allow the batch dialog to close when waiting to process. IsClosing = false;//B2017-221 Allow the batch dialog to close when waiting to process.
@@ -133,6 +141,8 @@ namespace VEPROMS
//myTreeNodePath = new List<string>(); //myTreeNodePath = new List<string>();
myTV.Nodes.Clear(); myTV.Nodes.Clear();
myDocVersions.Clear(); myDocVersions.Clear();
myFolders.Clear();
FolderInfo fi = FolderInfo.GetTop(); FolderInfo fi = FolderInfo.GetTop();
TreeNode tn = myTV.Nodes.Add(fi.Name); TreeNode tn = myTV.Nodes.Add(fi.Name);
tn.Tag = fi; tn.Tag = fi;
@@ -156,99 +166,74 @@ namespace VEPROMS
if (fi.ChildFolderCount > 0) if (fi.ChildFolderCount > 0)
{ {
if (noProcs) TreeNode tn = new TreeNode(fi.Name);
{ tn.Tag = fi;
LoadBottomLevelFolders(fi, myTVdel); tn.StateImageIndex = -1; // Hide the checkbox for the root node
} LoadChildFolders(fi, tn, noProcs);
else myTVdel.Nodes.Add(tn);
{
TreeNode tn = new TreeNode(fi.Name);
tn.Tag = fi;
tn.StateImageIndex = -1; // Hide the checkbox for the root node
LoadChildFolders(fi, tn, noProcs);
myTVdel.Nodes.Add(tn);
}
} }
if (myTVdel.SelectedNode != null) if (myTVdel.SelectedNode != null)
myTVdel.SelectedNode.Expand(); myTVdel.SelectedNode.Expand();
this.Cursor = Cursors.Default;
//btnFixLinks.Enabled = false; //Expand if folders
//this.Cursor = Cursors.WaitCursor; if (noProcs)
////myTreeNodePath = new List<string>(); myTVdel.ExpandAll();
//myTVdel.Nodes.Clear();
//myDocVersions.Clear(); this.Cursor = Cursors.Default;
//FolderInfo fi = FolderInfo.GetTop();
//TreeNode tn = myTVdel.Nodes.Add(fi.Name );
//tn.Tag = fi;
//if (fi.ChildFolderCount > 0)
//{
// if (noProcs)
// {
// LoadBottomLevelFolders(fi, myTVdel);
// }
// else
// LoadChildFolders(fi, tn, noProcs);
//}
//if (myTVdel.SelectedNode != null)
// myTVdel.SelectedNode.Expand();
//this.Cursor = Cursors.Default;
} }
// B2021-060 Higher level folders where being removed from the tree even if there was a child folder that containe a working draft set // B2021-060 Higher level folders where being removed from the tree even if there was a child folder that containe a working draft set
private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs) private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
{ {
bool loadedWorkingDraft = false; bool loadedWorkingDraft = false;
bool loadedChildWorkingDraft = false; // B2021-060 flag when child folder working draft is loaded bool loadedChildWorkingDraft = false;
foreach (FolderInfo fic in fi.SortedChildFolders) foreach (FolderInfo fic in fi.SortedChildFolders)
{ {
TreeNode tnc = tn.Nodes.Add(fic.Name); TreeNode tnc = tn.Nodes.Add(fic.Name);
tnc.Tag = fic; tnc.Tag = fic;
if (fic.ChildFolderCount > 0) if (fic.ChildFolderCount > 0)
{
if (LoadChildFolders(fic, tnc, noProcs)) if (LoadChildFolders(fic, tnc, noProcs))
{
loadedChildWorkingDraft = true; loadedChildWorkingDraft = true;
// B2020-114 and C2020-035 only show folders the Set Admin can access }
}
if (fic.FolderDocVersionCount > 0) if (fic.FolderDocVersionCount > 0)
{ {
if (!LoadDocVersions(fic, tnc, noProcs)) if (!LoadDocVersions(fic, tnc, noProcs))
{
tnc.Remove(); tnc.Remove();
}
else else
{
loadedWorkingDraft = true; loadedWorkingDraft = true;
} }
}
if (loadedChildWorkingDraft) loadedWorkingDraft = true; // B2021-060 if child folder working draft loaded set loadedWorkingDraft
if (tn.Parent != null && !loadedWorkingDraft)
tn.Remove();
return loadedWorkingDraft;
}
/// <summary>
/// Load only bottom layer of folders into treenode.
/// </summary>
/// <param name="fi"></param>
/// <param name="tn"></param>
private void LoadBottomLevelFolders(FolderInfo fi, TreeView treeView)
{
foreach (FolderInfo fic in fi.SortedChildFolders)
{
if (fic.ChildFolderCount > 0)
{
// Recursively call for child folders
LoadBottomLevelFolders(fic, treeView);
} }
else else
{ {
if (fic.Name != "PROMS") // Add the folder to the dictionary
if (!myFolders.ContainsKey(tnc))
{ {
myFolders.Add(tnc, fic);
// If the folder is a bottom-level folder (no child folders), add it directly to the TreeView
TreeNode tnc = treeView.Nodes.Add(fic.Name);
tnc.Tag = fic;
} }
} }
} }
if (loadedChildWorkingDraft)
{
loadedWorkingDraft = true;
}
if (tn.Parent != null && !loadedWorkingDraft)
{
tn.Remove();
}
return loadedWorkingDraft;
} }
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs) private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
{ {
@@ -1227,12 +1212,10 @@ namespace VEPROMS
DiselectParentNodes(e.Node.Parent); DiselectParentNodes(e.Node.Parent);
DiselectChildNodes(e.Node.Nodes); DiselectChildNodes(e.Node.Nodes);
} }
} }
btnFixLinks.Enabled = AtLeastOneNodeChecked(); // C2017-030 support for Refresh Transitions/Update RO Values btnFixLinks.Enabled = AtLeastOneNodeChecked(); // C2017-030 support for Refresh Transitions/Update RO Values
} }
private void DiselectParentNodes(TreeNode parent) private void DiselectParentNodes(TreeNode parent)
{ {
while (parent != null) while (parent != null)
@@ -1242,7 +1225,6 @@ namespace VEPROMS
parent = parent.Parent; parent = parent.Parent;
} }
} }
private void DiselectChildNodes(TreeNodeCollection childes) private void DiselectChildNodes(TreeNodeCollection childes)
{ {
foreach (TreeNode oneChild in childes) foreach (TreeNode oneChild in childes)
@@ -1252,8 +1234,6 @@ namespace VEPROMS
DiselectChildNodes(oneChild.Nodes); DiselectChildNodes(oneChild.Nodes);
} }
} }
private void CheckChildNodes(TreeNode treeNode, bool ischecked) private void CheckChildNodes(TreeNode treeNode, bool ischecked)
{ {
foreach (TreeNode tn in treeNode.Nodes) foreach (TreeNode tn in treeNode.Nodes)
@@ -1267,6 +1247,80 @@ namespace VEPROMS
} }
} }
//After check model to select and deselect nodes on the delete and annotation tree.
private void myTV_AfterCheck_DelAnn(object sender, TreeViewEventArgs e)
{
if (e.Action != TreeViewAction.Unknown)
{
if (e.Node.Nodes.Count > 0)
{
CheckChildNodes_DelAnn(e.Node, e.Node.Checked);
}
}
if (e.Node.Checked)
{
// Ensure child nodes follow the parent node's state
CheckChildNodes_DelAnn(e.Node, e.Node.Checked);
}
else
{
// Automatically deselect parent nodes if current node is unchecked
if (swDeleteFolder.Value)
DiselectParentNodes_DelAnn(e.Node);
}
btnFixLinks.Enabled = AtLeastOneNodeChecked_DelAnn(); // Ensure button is enabled based on custom logic
}
private void DiselectParentNodes_DelAnn(TreeNode node)
{
TreeNode parent = node.Parent;
while (parent != null)
{
parent.Checked = false;
parent = parent.Parent;
}
}
private void DiselectChildNodes_DelAnn(TreeNodeCollection children)
{
foreach (TreeNode child in children)
{
child.Checked = false;
DiselectChildNodes_DelAnn(child.Nodes);
}
}
private void CheckChildNodes_DelAnn(TreeNode treeNode, bool isChecked)
{
foreach (TreeNode tn in treeNode.Nodes)
{
tn.Checked = isChecked;
if (tn.Nodes.Count > 0)
CheckChildNodes_DelAnn(tn, isChecked);
}
}
private bool AtLeastOneNodeChecked_DelAnn()
{
foreach (TreeNode node in myTV.Nodes)
{
if (node.Checked || AnyChildNodeChecked_DelAnn(node))
return true;
}
return false;
}
private bool AnyChildNodeChecked_DelAnn(TreeNode node)
{
foreach (TreeNode childNode in node.Nodes)
{
if (childNode.Checked || AnyChildNodeChecked_DelAnn(childNode))
return true;
}
return false;
}
private ProgressBarItem _ProgressBar = null; private ProgressBarItem _ProgressBar = null;
public ProgressBarItem ProgressBar public ProgressBarItem ProgressBar
@@ -1378,8 +1432,7 @@ namespace VEPROMS
// new Admin Tools user interface for deletes // new Admin Tools user interface for deletes
private void sideNavItmDelete_Click(object sender, EventArgs e) private void sideNavItmDelete_Click(object sender, EventArgs e)
{ {
AdminToolType = E_AdminToolType.Delete; AdminToolType = E_AdminToolType.Delete;
lblAdmToolProgressType.Text = "";
setupProgessSteps1(); setupProgessSteps1();
if (swDeleteFolder.Value) if (swDeleteFolder.Value)
@@ -1456,8 +1509,20 @@ namespace VEPROMS
break; break;
case E_AdminToolType.Delete: case E_AdminToolType.Delete:
splitContainer3.Panel2Collapsed = true; if (swDeleteFolder.Value)
progressSteps1.Visible = false; {
splitContainer3.Panel2Collapsed = false;
progressSteps1.Items.Add(siOrphDatRecs);
lblAdmToolProgressType.Text = "Repairing: ";
progressSteps1.Visible = true;
progressSteps1.Refresh();
}
else
{
lblAdmToolProgressType.Text = "";
splitContainer3.Panel2Collapsed = true;
progressSteps1.Visible = false;
}
break; break;
} }
} }
@@ -1659,15 +1724,17 @@ namespace VEPROMS
//C2024-005 Delete Annotations, Delete Folders //C2024-005 Delete Annotations, Delete Folders
private void swDeleteAnnotations_ValueChanged(object sender, EventArgs e) private void swDeleteAnnotations_ValueChanged(object sender, EventArgs e)
{ {
setupProgessSteps1();
swDeleteFolder.Value = !swDeleteAnnotations.Value; swDeleteFolder.Value = !swDeleteAnnotations.Value;
if (swDeleteFolder.Value) if (swDeleteFolder.Value)
ResetDelTV(true); ResetDelTV(true);
else else
ResetDelTV(false); ResetDelTV(false);
} }
private void swDeleteFolder_ValueChanged(object sender, EventArgs e) private void swDeleteFolder_ValueChanged(object sender, EventArgs e)
{ {
setupProgessSteps1();
swDeleteAnnotations.Value = !swDeleteFolder.Value; swDeleteAnnotations.Value = !swDeleteFolder.Value;
if (swDeleteFolder.Value) if (swDeleteFolder.Value)
ResetDelTV(true); ResetDelTV(true);
@@ -1681,40 +1748,26 @@ namespace VEPROMS
txtResults.Clear(); txtResults.Clear();
txtProcess.Clear(); txtProcess.Clear();
if (swDeleteFolder.Value) if (swDeleteFolder.Value)
{ {
//TODO process deletions of folders if (FlexibleMessageBox.Show(this, "You sure you want to remove the selected folders and their contents?", "Confirm Folder Deletion", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
txtProcess.AppendText("Deleting Folders..."); {
txtProcess.AppendText("Deleting Folders...");
//List<ProcedureInfo> pil = new List<ProcedureInfo>(); //Load Selected Folders with docversions
//foreach (TreeNode tn in myProcedures.Keys) List<DocVersionInfo> dvil = new List<DocVersionInfo>();
// if (tn.Checked) foreach (TreeNode tn in myDocVersions.Keys)
// pil.Add(myProcedures[tn]); if (tn.Checked)
dvil.Add(myDocVersions[tn]);
////Load Selected Folders //Load Selected Folders with docversions
Dictionary<int, string> folderData = new Dictionary<int, string>(); List<FolderInfo> ef = new List<FolderInfo>();
foreach (TreeNode tn in myFolders.Keys)
if (tn.Checked)
ef.Add(myFolders[tn]);
//List<FolderInfo> Flist = new List<FolderInfo>(); ProcessDelete(dvil, ef);
//foreach (TreeNode tn in myDocVersions.Keys) }
// if (tn.Checked)
// Flist.Add();
//List<DocVersionInfo> dvil = new List<DocVersionInfo>();
//foreach (TreeNode tn in myDocVersions.Keys)
// if (tn.Checked)
// dvil.Add(myDocVersions[tn]);
//foreach (TreeNode tn in myTVdel.Nodes)
//{
// if (tn.Checked)
// {
// var itemInfo = myProcedures[tn];
// folderData.Add(itemInfo.ItemID, itemInfo.DisplayText);
// }
//}
//ProcessDelete(dvil);
} }
else else
{ {
@@ -1736,12 +1789,10 @@ namespace VEPROMS
frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil); frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil);
frmAnnoDel.ShowDialog(); frmAnnoDel.ShowDialog();
} }
} }
private void ProcessDelete(List<DocVersionInfo> foldersToDelete) private void ProcessDelete(List<DocVersionInfo> foldersToDelete, List<FolderInfo> emptyFoldersToDelete)
{ {
DateTime pStart = DateTime.Now; DateTime pStart = DateTime.Now;
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
@@ -1750,11 +1801,12 @@ namespace VEPROMS
foreach (var kvp in foldersToDelete) foreach (var kvp in foldersToDelete)
{ {
int itemID = (int)kvp.ItemID; //Gather folder information
string folderName = kvp.Name; FolderInfo fi = (FolderInfo)kvp.ActiveParent;
int itemID = (int)fi.FolderID;
string folderName = fi.Name;
// Perform the deletion operation // Perform the deletion operation
// Assume DeleteFolderByID is a method that deletes the folder by its ItemID
bool deletionSuccessful = DeleteFolderByID(itemID); bool deletionSuccessful = DeleteFolderByID(itemID);
// Update txtProcess with the progress // Update txtProcess with the progress
@@ -1768,13 +1820,59 @@ namespace VEPROMS
} }
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
} }
//Delete non working info folders.
foreach (var kvp in emptyFoldersToDelete)
{
//Gather folder information
FolderInfo fi = (FolderInfo)kvp;
int itemID = (int)fi.FolderID;
string folderName = fi.Name;
// Perform the deletion operation
bool deletionSuccessful = DeleteFolderByID(itemID);
// Update txtProcess with the progress
if (deletionSuccessful)
{
txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})");
}
else
{
txtProcess.AppendText($"Failed to delete folder: {folderName} (ID: {itemID})");
}
txtProcess.AppendText(Environment.NewLine);
}
//Run Repair
int prgStpIdx = -1;
StepProgress(++prgStpIdx, 50);
PurgeDisconnectedItems(); // Orphan Items
StepProgress(prgStpIdx, 100);
//rebuild
ResetDelTV(true);
MessageBox.Show("Folder Deletion Completed", "Delete Folders");
ClearStepProgress();
} }
// Example deletion method private bool DeleteFolderByID(int folderID)
private bool DeleteFolderByID(int itemID)
{ {
// Implement your folder deletion logic here try
// Return true if deletion was successful, false otherwise {
return true; // Placeholder //Delete
Folder.DeleteFolderAdmin(folderID);
//update treeview UI via veProms
_veProms.tv_FolderDelete(folderID);
return true;
}
catch
{
return false;
}
} }
public List<ProcedureInfo> RetrieveChkAnnotations() public List<ProcedureInfo> RetrieveChkAnnotations()

View File

@@ -149,29 +149,114 @@ Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value> If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
</data> </data>
<data name="labelX14.SuperTooltip" xml:space="preserve"> <data name="labelX14.SuperTooltip" xml:space="preserve">
<value>This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete.
Click on the on/off switches to turn on/off each tool.
Note that only one of these tools can be run at a time.</value>
</data>
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX12.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value>
</data>
<data name="swUpdateROVals.SuperTooltip" xml:space="preserve">
<value>This allows the user to update referenced objects values for multiple working drafts in a batch mode.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="swRefreshTrans.SuperTooltip" xml:space="preserve">
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set. <value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
Be sure a current backup of the database exists prior to running this function. Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value> If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="labelX11.SuperTooltip" xml:space="preserve">
<value>This allows the user to update referenced objects values for multiple working drafts in a batch mode.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX6.SuperTooltip" xml:space="preserve">
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value>
</data>
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft). <value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
@@ -235,37 +320,37 @@ This function will remove all of the saved attachment PDFS stored in the databas
</data> </data>
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84 xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve">
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft). <value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
@@ -315,94 +400,9 @@ Should an item become orphaned (disconnected) from the rest of the data, it will
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it. <value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool removes any orphaned items from the database. Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool removes any orphaned items from the database.
</value>
</data>
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX12.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value>
</data>
<data name="swUpdateROVals.SuperTooltip" xml:space="preserve">
<value>This allows the user to update referenced objects values for multiple working drafts in a batch mode.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="swRefreshTrans.SuperTooltip" xml:space="preserve">
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="labelX11.SuperTooltip" xml:space="preserve">
<value>This allows the user to update referenced objects values for multiple working drafts in a batch mode.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX6.SuperTooltip" xml:space="preserve">
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>46</value> <value>46</value>
</metadata> </metadata>
</root> </root>

View File

@@ -216,6 +216,8 @@ namespace VEPROMS
set { _MyDocVersion = value; } set { _MyDocVersion = value; }
} }
// C2015-022 setup the child PROMS window // C2015-022 setup the child PROMS window
public frmVEPROMS(frmVEPROMS myParent, DocVersionInfo myDocVersion) public frmVEPROMS(frmVEPROMS myParent, DocVersionInfo myDocVersion)
{ {
@@ -254,6 +256,22 @@ namespace VEPROMS
tc.RefreshItem(myItemInfo); tc.RefreshItem(myItemInfo);
} }
public void tv_FolderDelete(int folderId)
{
// Create an instance of the event args if needed
var args = new vlnTreeFolderDeleteEventArgs(folderId);
// Trigger the deletion using the event arguments
tv.RemoveFolder(args.FolderId);
}
private bool Tv_DeleteFolder(object sender, vlnTreeFolderDeleteEventArgs args)
{
tv.RemoveFolder(args.FolderId);
return true;
}
private E_UCFImportOptions _UCFImportOptionsFromSettings; private E_UCFImportOptions _UCFImportOptionsFromSettings;
public frmVEPROMS() public frmVEPROMS()
@@ -475,6 +493,7 @@ namespace VEPROMS
tv.OpenItem += new vlnTreeViewItemInfoEvent(tv_OpenItem); tv.OpenItem += new vlnTreeViewItemInfoEvent(tv_OpenItem);
tv.TabDisplay += new StepPanelTabDisplayEvent(tc_PanelTabDisplay); tv.TabDisplay += new StepPanelTabDisplayEvent(tc_PanelTabDisplay);
tv.DeleteItemInfo += new vlnTreeViewItemInfoDeleteEvent(tv_DeleteItemInfo); tv.DeleteItemInfo += new vlnTreeViewItemInfoDeleteEvent(tv_DeleteItemInfo);
tv.DeleteFolder += new vlnTreeViewItemInfoDeleteFolderEvent(Tv_DeleteFolder);
tv.InsertItemInfo += new vlnTreeViewItemInfoInsertEvent(tv_InsertItemInfo); tv.InsertItemInfo += new vlnTreeViewItemInfoInsertEvent(tv_InsertItemInfo);
tv.NodeInsert += new vlnTreeViewEvent(tv_NodeInsert); tv.NodeInsert += new vlnTreeViewEvent(tv_NodeInsert);
tv.PasteItemInfo += new vlnTreeViewItemInfoPasteEvent(tv_PasteItemInfo); tv.PasteItemInfo += new vlnTreeViewItemInfoPasteEvent(tv_PasteItemInfo);
@@ -1603,6 +1622,11 @@ namespace VEPROMS
return rtval; return rtval;
} }
private bool tv_DeleteFolder(object sender, vlnTreeItemInfoEventArgs args)
{
return true;
}
private bool tv_PasteItemInfo(object sender, vlnTreeItemInfoPasteEventArgs args) private bool tv_PasteItemInfo(object sender, vlnTreeItemInfoPasteEventArgs args)
{ {
return tc.PasteRTBItem(args.MyItemInfo, args.CopyStartID, args.PasteType, (int)args.Type); return tc.PasteRTBItem(args.MyItemInfo, args.CopyStartID, args.PasteType, (int)args.Type);
@@ -2741,7 +2765,7 @@ namespace VEPROMS
void btnAdministrativeTools_Click(object sender, EventArgs e) void btnAdministrativeTools_Click(object sender, EventArgs e)
{ {
frmBatchRefresh frm = new frmBatchRefresh(MySessionInfo); frmBatchRefresh frm = new frmBatchRefresh(MySessionInfo, this);
frm.ProgressBar = bottomProgBar; frm.ProgressBar = bottomProgBar;
frm.ShowDialog(this); frm.ShowDialog(this);
} }

View File

@@ -1433,6 +1433,31 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Folder.Remove", ex); throw new DbCslaException("Folder.Remove", ex);
} }
} }
[Transactional(TransactionalTypes.TransactionScope)]
public static void DeleteFolderAdmin(int folderID)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Folder.Remove", 0);
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteFolderAdmin";
cm.Parameters.AddWithValue("@FolderID", folderID);
cm.ExecuteNonQuery();
}
}
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("Folder.Remove", ex);
throw new DbCslaException("Folder.Remove", ex);
}
}
#endregion #endregion
#region Exists #region Exists
public static bool Exists(int folderID) public static bool Exists(int folderID)
@@ -1536,6 +1561,8 @@ namespace VEPROMS.CSLA.Library
// Needs to be overriden to add new validation rules // Needs to be overriden to add new validation rules
} }
} }
#endregion #endregion
} // Class } // Class
#region Converter #region Converter

View File

@@ -1,36 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace VEPROMS.CSLA.Library.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=plarsen;Initial Catalog=VEPROMS_BRAIDWOOD;Integrated Security=True")]
public string VEPROMS_BRAIDWOODConnectionString {
get {
return ((string)(this["VEPROMS_BRAIDWOODConnectionString"]));
}
}
}
}

View File

@@ -1,14 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="VEPROMS.CSLA.Library.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="VEPROMS_BRAIDWOODConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=plarsen;Initial Catalog=VEPROMS_BRAIDWOOD;Integrated Security=True&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=plarsen;Initial Catalog=VEPROMS_BRAIDWOOD;Integrated Security=True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -167,7 +167,9 @@ namespace VEPROMS.CSLA.Library
tn.ResetNode("Dummy GetFolder"); tn.ResetNode("Dummy GetFolder");
return tn; return tn;
} }
// public abstract void LoadChildren();
// public abstract void LoadChildren();
//private long _Start; //private long _Start;
//private Dictionary<string, long> _Timings=new Dictionary<string,long>(); //private Dictionary<string, long> _Timings=new Dictionary<string,long>();
//private void tReset() //private void tReset()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -346,10 +346,11 @@ namespace Volian.Controls.Library
ch = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag; ch = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag;
chld = ch.children; chld = ch.children;
// build a list of ROs to search // build a list of ROs to search
return _MyRODbID.ToString() + ":" + GetROsToSearch(chld); // B2022-118: remove the ending comma otherwise query will fail
//return _MyRODbID.ToString() + ":" + ch.roid + "0000," + GetROsToSearch(chld); string strRtnStr = _MyRODbID.ToString() + ":" + GetROsToSearch(chld);
//if (strRtnStr.EndsWith(",")) if (strRtnStr.EndsWith(","))
// strRtnStr = strRtnStr.Substring(0, strRtnStr.Length - 1); strRtnStr = strRtnStr.Substring(0, strRtnStr.Length - 1);
return strRtnStr;
} }
} }
} }
@@ -1939,6 +1940,13 @@ namespace Volian.Controls.Library
private string GetROsToSearch(ROFSTLookup.rochild[] chld) private string GetROsToSearch(ROFSTLookup.rochild[] chld)
{ {
string rtnstr = string.Empty; string rtnstr = string.Empty;
// B2022-118: If the ro has child nodes in tree view but they aren't loaded, load them
if ((chld == null || chld.Length <= 0) && (cmboTreeROs.SelectedNode.Nodes != null || cmboTreeROs.SelectedNode.Nodes.Count >= 1))
{
ROFSTLookup.rochild ro = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag;
MyROFSTLookup.LoadChildren(ref ro);
chld = ro.children;
}
// B2022-026 RO Memory Reduction code - check children length // B2022-026 RO Memory Reduction code - check children length
if (chld == null || chld.Length <= 0) // get a single ROID if (chld == null || chld.Length <= 0) // get a single ROID
@@ -1956,7 +1964,17 @@ namespace Volian.Controls.Library
if (roc.children != null && roc.children.Length > 0) if (roc.children != null && roc.children.Length > 0)
rtnstr += GetROsToSearch(roc.children); rtnstr += GetROsToSearch(roc.children);
else else
rtnstr += ROFSTLookup.FormatRoidKey(roc.roid, false); {
// B2022-118: If the ro has child nodes in tree view but they aren't loaded, load them
ROFSTLookup.rochild rot = roc;
MyROFSTLookup.LoadChildren(ref rot);
chld = rot.children;
if (rot.children != null && rot.children.Length > 0)
rtnstr += GetROsToSearch(rot.children);
else
rtnstr += string.Format("{0},", ROFSTLookup.FormatRoidKey(roc.roid, false));
}
} }
} }

View File

@@ -669,7 +669,7 @@ namespace Volian.Controls.Library
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
string key = "Item - " + proc.ItemID.ToString(); string key = "Item - " + proc.ItemID.ToString();
if (_MyDisplayTabItems.ContainsKey(key)) // If procedure page open use it if (_MyDisplayTabItems.ContainsKey(key) && pasteType != ItemInfo.EAddpingPart.Replace) // If procedure page open use it unless replace
{ {
DisplayTabItem pg = _MyDisplayTabItems[key]; DisplayTabItem pg = _MyDisplayTabItems[key];
if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) && if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) &&
@@ -708,6 +708,11 @@ namespace Volian.Controls.Library
return true; return true;
} }
} }
else if (_MyDisplayTabItems.ContainsKey(key) && pasteType == ItemInfo.EAddpingPart.Replace)
{
CloseTabItem(_MyDisplayTabItems["Item - " + myItemInfo.ItemID.ToString()]); //Grab itemID and set to close open tab.
return false; //B2017-179 PasteReplace will return null if was aborted
}
return false; return false;
} }

View File

@@ -1825,8 +1825,16 @@ namespace Volian.Controls.Library
EditItem newFocus = null; EditItem newFocus = null;
EditItem nextEditItem = MyNextEditItem; EditItem nextEditItem = MyNextEditItem;
EditItem prevEditItem = MyPreviousEditItem; EditItem prevEditItem = MyPreviousEditItem;
if (MyStepPanel?.SelectedEditItem?.ActiveParent == null) return null; //Was causing an error when active parent was null and the replaced proc was opened in the editor. EditItem parentEditItem = null; // ActiveParent;
EditItem parentEditItem = ActiveParent; try
{
parentEditItem = ActiveParent ?? MyStepPanel?.SelectedEditItem?.ActiveParent;
}
catch (NullReferenceException)
{
// KL 7/11/2024 - Handle the case where ActiveParent throws a Null Reference Exception
parentEditItem = MyStepPanel?.SelectedEditItem?.ActiveParent;
}
StepConfig savOrigPasteConfig = MyItemInfo.MyConfig as StepConfig; StepConfig savOrigPasteConfig = MyItemInfo.MyConfig as StepConfig;
int TopMostYBefore = TopMostEditItem.Top; int TopMostYBefore = TopMostEditItem.Top;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -22,10 +22,11 @@ namespace Volian.Controls.Library
public delegate void vlnTreeViewEvent(object sender, vlnTreeEventArgs args); public delegate void vlnTreeViewEvent(object sender, vlnTreeEventArgs args);
public delegate void vlnTreeViewTimeEvent(object sender, vlnTreeTimeEventArgs args); public delegate void vlnTreeViewTimeEvent(object sender, vlnTreeTimeEventArgs args);
public delegate void vlnTreeViewStatusEvent(object sender, vlnTreeStatusEventArgs args); public delegate void vlnTreeViewStatusEvent(object sender, vlnTreeStatusEventArgs args);
public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args); public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args);
public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args); public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args);
public delegate bool vlnTreeViewBoolEvent(object sender, vlnTreeEventArgs args); public delegate bool vlnTreeViewBoolEvent(object sender, vlnTreeEventArgs args);
public delegate bool vlnTreeViewItemInfoDeleteEvent(object sender, vlnTreeItemInfoEventArgs args); public delegate bool vlnTreeViewItemInfoDeleteEvent(object sender, vlnTreeItemInfoEventArgs args);
public delegate bool vlnTreeViewItemInfoDeleteFolderEvent(object sender, vlnTreeFolderDeleteEventArgs args);
public delegate bool vlnTreeViewItemInfoInsertEvent(object sender, vlnTreeItemInfoInsertEventArgs args); public delegate bool vlnTreeViewItemInfoInsertEvent(object sender, vlnTreeItemInfoInsertEventArgs args);
public delegate bool vlnTreeViewItemInfoPasteEvent(object sender, vlnTreeItemInfoPasteEventArgs args); public delegate bool vlnTreeViewItemInfoPasteEvent(object sender, vlnTreeItemInfoPasteEventArgs args);
public delegate TreeNode vlnTreeViewTreeNodeEvent(object sender, vlnTreeEventArgs args); public delegate TreeNode vlnTreeViewTreeNodeEvent(object sender, vlnTreeEventArgs args);
@@ -220,6 +221,15 @@ namespace Volian.Controls.Library
} }
#endregion #endregion
} }
public class vlnTreeFolderDeleteEventArgs : EventArgs
{
public int FolderId { get; }
public vlnTreeFolderDeleteEventArgs(int folderId)
{
FolderId = folderId;
}
}
public enum E_InsertType {Before, After, Child}; public enum E_InsertType {Before, After, Child};
public partial class vlnTreeItemInfoInsertEventArgs public partial class vlnTreeItemInfoInsertEventArgs
{ {
@@ -427,6 +437,12 @@ namespace Volian.Controls.Library
if (DeleteItemInfo != null) return DeleteItemInfo(sender, args); if (DeleteItemInfo != null) return DeleteItemInfo(sender, args);
return false; return false;
} }
public event vlnTreeViewItemInfoDeleteFolderEvent DeleteFolder;
private bool OnDeleteFolder(object sender, vlnTreeFolderDeleteEventArgs args)
{
if (DeleteItemInfo != null) return DeleteFolder(sender, args);
return false;
}
public event vlnTreeViewItemInfoInsertEvent InsertItemInfo; public event vlnTreeViewItemInfoInsertEvent InsertItemInfo;
private bool OnInsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args) private bool OnInsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args)
{ {
@@ -551,11 +567,11 @@ namespace Volian.Controls.Library
{ {
if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args); if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args);
} }
public event vlnTreeViewEvent ExportImportProcedureSets; public event vlnTreeViewEvent ExportImportProcedureSets;
private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args)
{ {
if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args); if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args);
} }
public event vlnTreeViewEvent PrintTransitionReport; public event vlnTreeViewEvent PrintTransitionReport;
private void OnPrintTransitionReport(object sender, vlnTreeEventArgs args) private void OnPrintTransitionReport(object sender, vlnTreeEventArgs args)
{ {
@@ -607,7 +623,7 @@ namespace Volian.Controls.Library
// This event was added to update the Step Properties/RO & Tools/Search RO & Reports // This event was added to update the Step Properties/RO & Tools/Search RO & Reports
// when an update of ro.fst is done & the ro trees on those panels needs refreshed. // when an update of ro.fst is done & the ro trees on those panels needs refreshed.
// (bug fix B2015-226) // (bug fix B2015-226)
public event StepPanelTabDisplayEvent TabDisplay; public event StepPanelTabDisplayEvent TabDisplay;
private void OnTabDisplay(object sender, StepPanelTabDisplayEventArgs args) private void OnTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
{ {
if (TabDisplay != null) TabDisplay(sender, args); if (TabDisplay != null) TabDisplay(sender, args);
@@ -693,39 +709,39 @@ namespace Volian.Controls.Library
//_MyLog.WarnFormat("Context Menu 1b - {0}", GC.GetTotalMemory(true)); //_MyLog.WarnFormat("Context Menu 1b - {0}", GC.GetTotalMemory(true));
if (ui.IsAdministrator() || ui.IsSetAdministrator(fi)) if (ui.IsAdministrator() || ui.IsSetAdministrator(fi))
{ {
if (fi.MyParent != null) // don't allow insert before/after if at top node if (fi.MyParent != null) // don't allow insert before/after if at top node
{ {
if (!ui.IsAdministrator() && DoSpecificInfo) cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click)); if (!ui.IsAdministrator() && DoSpecificInfo) cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click));
// B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate // B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate
if (ui.IsAdministrator()||ui.IsSetAdministrator(fi.MyParent)) if (ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent))
{ {
cm.MenuItems.Add("Insert Folder Before", new EventHandler(mi_Click)); cm.MenuItems.Add("Insert Folder Before", new EventHandler(mi_Click));
cm.MenuItems.Add("Insert Folder After", new EventHandler(mi_Click)); cm.MenuItems.Add("Insert Folder After", new EventHandler(mi_Click));
} }
} }
// B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate // B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate
if ((ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent)) && fi.FolderDocVersionCount == 0) if ((ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent)) && fi.FolderDocVersionCount == 0)
cm.MenuItems.Add("New Folder", new EventHandler(mi_Click)); cm.MenuItems.Add("New Folder", new EventHandler(mi_Click));
if (fi.ChildFolderCount == 0 && !fi.HasWorkingDraft) if (fi.ChildFolderCount == 0 && !fi.HasWorkingDraft)
cm.MenuItems.Add("Create Working Draft", new EventHandler(mi_Click)); cm.MenuItems.Add("Create Working Draft", new EventHandler(mi_Click));
} }
if (fi.HasWorkingDraft) if (fi.HasWorkingDraft)
cm.MenuItems.Add("Print Transition Report", new EventHandler(mi_Click)); cm.MenuItems.Add("Print Transition Report", new EventHandler(mi_Click));
} }
else if (tn.VEObject as DocVersionInfo != null) // DocVersions can only contain procs else if (tn.VEObject as DocVersionInfo != null) // DocVersions can only contain procs
{ {
isWrkDftNode = true; isWrkDftNode = true;
//_MyLog.WarnFormat("Context Menu 1c - {0}", GC.GetTotalMemory(true)); //_MyLog.WarnFormat("Context Menu 1c - {0}", GC.GetTotalMemory(true));
DocVersionInfo dvi = tn.VEObject as DocVersionInfo; DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi)) if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi))
{ {
cm.MenuItems.Add("Import Procedure", mi_Click); cm.MenuItems.Add("Import Procedure", mi_Click);
} }
if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi)) if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi))
{ {
OwnerInfoList.Reset(); OwnerInfoList.Reset();
oil = OwnerInfoList.GetByVersionID(dvi.VersionID); oil = OwnerInfoList.GetByVersionID(dvi.VersionID);
if (dvi.ActiveFormat.PlantFormat.FormatData.SpecificInfo) if (dvi.ActiveFormat.PlantFormat.FormatData.SpecificInfo)
cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click)); cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click));
cm.MenuItems.Add("Refresh Checked Out Procedures", new EventHandler(mi_Click)); cm.MenuItems.Add("Refresh Checked Out Procedures", new EventHandler(mi_Click));
cm.MenuItems.Add("New Procedure", new EventHandler(mi_Click)); cm.MenuItems.Add("New Procedure", new EventHandler(mi_Click));
@@ -812,15 +828,15 @@ namespace Volian.Controls.Library
urv.Enabled = !dvi.ROfstLastCompleted || dvi.NewerRoFst; urv.Enabled = !dvi.ROfstLastCompleted || dvi.NewerRoFst;
} }
} }
else if (tn.VEObject as ProcedureInfo != null) // Procs can only contain sections else if (tn.VEObject as ProcedureInfo != null) // Procs can only contain sections
{ {
isProcNode = true; isProcNode = true;
ProcedureInfo pri = tn.VEObject as ProcedureInfo; ProcedureInfo pri = tn.VEObject as ProcedureInfo;
oi = OwnerInfo.GetByItemID(pri.ItemID, CheckOutType.Procedure); oi = OwnerInfo.GetByItemID(pri.ItemID, CheckOutType.Procedure);
if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion)) if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion))
{ {
cm.MenuItems.Add("Export Procedure", mi_Click); cm.MenuItems.Add("Export Procedure", mi_Click);
} }
if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion)) if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion))
{ {
if (oi != null && oi.SessionID != MySessionInfo.SessionID) if (oi != null && oi.SessionID != MySessionInfo.SessionID)
@@ -871,7 +887,7 @@ namespace Volian.Controls.Library
} }
cm.MenuItems.Add(micas); cm.MenuItems.Add(micas);
cm.MenuItems.Add(mitcas); cm.MenuItems.Add(mitcas);
cm.MenuItems.Add(mip); cm.MenuItems.Add(mip);
cm.MenuItems.Add(miqp); cm.MenuItems.Add(miqp);
//cm.MenuItems.Add(mips); //cm.MenuItems.Add(mips);
AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri);
@@ -1052,36 +1068,36 @@ namespace Volian.Controls.Library
ok = true; ok = true;
else if (tn.VEObject is ItemInfo && (ui.IsAdministrator() || ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion) || ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion))) else if (tn.VEObject is ItemInfo && (ui.IsAdministrator() || ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion) || ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)))
ok = true; ok = true;
if(ok) if (ok)
Menu_Paste(tn, cm); Menu_Paste(tn, cm);
#endregion #endregion
//_MyLog.WarnFormat("Context Menu 5 - {0}", GC.GetTotalMemory(true)); //_MyLog.WarnFormat("Context Menu 5 - {0}", GC.GetTotalMemory(true));
#region Menu_Delete #region Menu_Delete
if (ok) if (ok)
{
// Add delete to the menu unless at the very 'top' node, on a grouping (partinfo)
// node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items.
PartInfo pi = tn.VEObject as PartInfo;
if (pi == null && tn.Parent != null) // it's not a part and it's not the top....
{ {
// Add delete to the menu unless at the very 'top' node, on a grouping (partinfo) fi = tn.VEObject as FolderInfo;
// node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items. if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children
PartInfo pi = tn.VEObject as PartInfo;
if (pi == null && tn.Parent != null) // it's not a part and it's not the top....
{ {
fi = tn.VEObject as FolderInfo; DocVersionInfo di = tn.VEObject as DocVersionInfo;
if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children
{ {
DocVersionInfo di = tn.VEObject as DocVersionInfo; // if it's an enhanced step that was linked from a source, don't allow delete
if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children bool canDoDel = true;
{ ItemInfo iienh = tn.VEObject as ItemInfo;
// if it's an enhanced step that was linked from a source, don't allow delete if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false;
bool canDoDel = true; if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false;
ItemInfo iienh = tn.VEObject as ItemInfo; if (iienh != null && iienh.IsEnhancedStep) canDoDel = false;
if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false; if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click));
if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false;
if (iienh != null && iienh.IsEnhancedStep) canDoDel = false;
if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click));
}
} }
} }
} }
}
#endregion #endregion
//_MyLog.WarnFormat("Context Menu 6 - {0}", GC.GetTotalMemory(true)); //_MyLog.WarnFormat("Context Menu 6 - {0}", GC.GetTotalMemory(true));
#region Menu_ExternalTransitions #region Menu_ExternalTransitions
@@ -1117,13 +1133,13 @@ namespace Volian.Controls.Library
} }
doclink = string.Format("Unlink Source and {0} Procedure", doclink); doclink = string.Format("Unlink Source and {0} Procedure", doclink);
MenuItem mix = cm.MenuItems.Add(doclink, new EventHandler(miEnhanced_Click)); MenuItem mix = cm.MenuItems.Add(doclink, new EventHandler(miEnhanced_Click));
mix.Tag = -1; // NOTE this is what flags what gets processed on menu click, i.e. -1 mix.Tag = -1; // NOTE this is what flags what gets processed on menu click, i.e. -1
} }
// if this is a source procedure that has enhanced, for example Background and/or deviation, ask which should be unlinked including all // if this is a source procedure that has enhanced, for example Background and/or deviation, ask which should be unlinked including all
else if (eds != null && eds.Count > 1) else if (eds != null && eds.Count > 1)
{ {
MenuItem miu = new MenuItem("Unlink Enhanced Procedure(s) from Source"); MenuItem miu = new MenuItem("Unlink Enhanced Procedure(s) from Source");
miu.Tag = -2; // this menu item doesn't get used. miu.Tag = -2; // this menu item doesn't get used.
int k = 0; int k = 0;
foreach (EnhancedDocument ed in eds) foreach (EnhancedDocument ed in eds)
{ {
@@ -1134,7 +1150,7 @@ namespace Volian.Controls.Library
} }
// add all submenu item // add all submenu item
MenuItem mp1 = miu.MenuItems.Add("All", new EventHandler(miEnhanced_Click)); MenuItem mp1 = miu.MenuItems.Add("All", new EventHandler(miEnhanced_Click));
mp1.Tag = 0; // Tag of 0 flags All mp1.Tag = 0; // Tag of 0 flags All
cm.MenuItems.Add(miu); cm.MenuItems.Add(miu);
} }
} }
@@ -1144,9 +1160,9 @@ namespace Volian.Controls.Library
// Add Properties to the menu unless at the very 'top' node or on a grouping (partinfo) // Add Properties to the menu unless at the very 'top' node or on a grouping (partinfo)
// node (RNOs, Steps, Cautions, Notes) or at the step level. // node (RNOs, Steps, Cautions, Notes) or at the step level.
// B2020-105 Allow Set Administrators to rename folder's (sets of procedures) to which they have been given access. // B2020-105 Allow Set Administrators to rename folder's (sets of procedures) to which they have been given access.
if ( tn.VEObject is FolderInfo) ok = (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as FolderInfo)); if (tn.VEObject is FolderInfo) ok = (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as FolderInfo));
else ok = (tn.VEObject is DocVersionInfo) ? (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as DocVersionInfo)) else ok = (tn.VEObject is DocVersionInfo) ? (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as DocVersionInfo))
: (ui.IsAdministrator() || (tn.VEObject is ItemInfo) && (ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion) : (ui.IsAdministrator() || (tn.VEObject is ItemInfo) && (ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)
|| ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion))); || ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)));
PartInfo pia = tn.VEObject as PartInfo; PartInfo pia = tn.VEObject as PartInfo;
ItemInfo ii = tn.VEObject as ItemInfo; ItemInfo ii = tn.VEObject as ItemInfo;
@@ -1227,7 +1243,7 @@ namespace Volian.Controls.Library
itm.Text == "Procedure Set Specific Information" || itm.Text == "Approve All Procedures for" || itm.Text == "Procedure Set Specific Information" || itm.Text == "Approve All Procedures for" ||
itm.Text == "Approve Some Procedures" || itm.Text == "Approve Some Procedures for") itm.Text == "Approve Some Procedures" || itm.Text == "Approve Some Procedures for")
itm.Enabled = false; itm.Enabled = false;
} }
} }
} }
@@ -1256,9 +1272,9 @@ namespace Volian.Controls.Library
// F2022-024 added Time Critical Action Summary option // F2022-024 added Time Critical Action Summary option
foreach (MenuItem itm in cm.MenuItems) foreach (MenuItem itm in cm.MenuItems)
{ {
if(itm.Text == "Procedure Specific Information" || itm.Text == "New Section" || itm.Text == "Approve" || itm.Text == "Open" || if (itm.Text == "Procedure Specific Information" || itm.Text == "New Section" || itm.Text == "Approve" || itm.Text == "Open" ||
itm.Text == "Copy" || itm.Text == "Delete" || itm.Text == "Properties..." || itm.Text == "Replace Existing Procedure" || itm.Text == "Copy" || itm.Text == "Delete" || itm.Text == "Properties..." || itm.Text == "Replace Existing Procedure" ||
itm.Text.StartsWith("Showing Change Bars Starting") || itm.Text == "Create Continuous Action Summary" || itm.Text.StartsWith("Showing Change Bars Starting") || itm.Text == "Create Continuous Action Summary" ||
itm.Text == "Create Time Critical Action Summary" || itm.Text == "Export Procedure") itm.Text == "Create Time Critical Action Summary" || itm.Text == "Export Procedure")
itm.Enabled = false; itm.Enabled = false;
} }
@@ -1267,7 +1283,7 @@ namespace Volian.Controls.Library
{ {
foreach (MenuItem itm in cm.MenuItems) foreach (MenuItem itm in cm.MenuItems)
{ {
if(!itm.Text.StartsWith("Document Checked Out")) if (!itm.Text.StartsWith("Document Checked Out"))
itm.Enabled = false; itm.Enabled = false;
} }
} }
@@ -1284,7 +1300,7 @@ namespace Volian.Controls.Library
{ {
_currentPri = pri; _currentPri = pri;
RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID); RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID);
if (ril.Count == 0) return; // no versions to list if (ril.Count == 0) return; // no versions to list
MenuItem mi = menuItemCollection.Add("Versions"); MenuItem mi = menuItemCollection.Add("Versions");
int k = 0; int k = 0;
int lastApprovedRevisionID = 0; int lastApprovedRevisionID = 0;
@@ -1331,11 +1347,11 @@ namespace Volian.Controls.Library
ril = null; ril = null;
} }
} }
public void AddNewNode(IVEDrillDownReadOnly o) public void AddNewNode(IVEDrillDownReadOnly o)
{ {
VETreeNode tn = new VETreeNode(o); VETreeNode tn = new VETreeNode(o);
SelectedNode.Nodes.Add(tn); SelectedNode.Nodes.Add(tn);
} }
private void AddApprovedRevisions(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) private void AddApprovedRevisions(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
{ {
try try
@@ -1344,7 +1360,7 @@ namespace Volian.Controls.Library
_currentPri = pri; _currentPri = pri;
using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID)) using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID))
{ {
//_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true)); //_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true));
if (ril.Count == 0) return; // no versions to list if (ril.Count == 0) return; // no versions to list
MenuItem mi = menuItemCollection.Add("Versions"); MenuItem mi = menuItemCollection.Add("Versions");
int lastApprovedRevisionID = 0; int lastApprovedRevisionID = 0;
@@ -1425,7 +1441,7 @@ namespace Volian.Controls.Library
RevisionConfig rc = ri.MyConfig as RevisionConfig; RevisionConfig rc = ri.MyConfig as RevisionConfig;
// bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures. // bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures.
int applIdx = rc.Applicability_Index; int applIdx = rc.Applicability_Index;
string str = (applIdx > 0)?_currentPri.MyDocVersion.UnitNames[applIdx-1] +"_":""; // if parent/child get the defined child name to inlcude the export filename string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to inlcude the export filename
System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
xd.LoadXml(ri.LatestVersion.ApprovedXML); xd.LoadXml(ri.LatestVersion.ApprovedXML);
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
@@ -1473,12 +1489,12 @@ namespace Volian.Controls.Library
{ {
MenuItem mip = mi.Parent as MenuItem; MenuItem mip = mi.Parent as MenuItem;
//B2021-086 Added the check for the last revision stage is an Approved stage //B2021-086 Added the check for the last revision stage is an Approved stage
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved!=0) if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
superceded = true; superceded = true;
} }
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : ""); vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
OnViewPDF(sender, args); OnViewPDF(sender, args);
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded)); // System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
} }
void MultiUnitApprovedRevision_Click(object sender, EventArgs e) void MultiUnitApprovedRevision_Click(object sender, EventArgs e)
{ {
@@ -1591,7 +1607,7 @@ namespace Volian.Controls.Library
// 'from' is object copied // 'from' is object copied
// 'to' is object where paste was selected from // 'to' is object where paste was selected from
#region Menu_Paste_ToDocVersion #region Menu_Paste_ToDocVersion
if (tn.VEObject as DocVersionInfo != null) // paste item must be a proc if (tn.VEObject as DocVersionInfo != null) // paste item must be a proc
{ {
if (iiClipboard.IsProcedure) if (iiClipboard.IsProcedure)
{ {
@@ -1601,7 +1617,7 @@ namespace Volian.Controls.Library
// 3) 'to' docversion is 'source' and 'from' procedure is within this docversion // 3) 'to' docversion is 'source' and 'from' procedure is within this docversion
// 4) 'to' docVersion is 'enhanced' and 'from' procedure is not // 4) 'to' docVersion is 'enhanced' and 'from' procedure is not
bool canPaste = false; bool canPaste = false;
DocVersionInfo dvi = tn.VEObject as DocVersionInfo; DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
DocVersionConfig dvc = dvi.DocVersionConfig; DocVersionConfig dvc = dvi.DocVersionConfig;
bool docVersionIsEnhanced = dvc.MyEnhancedDocuments != null && dvc.MyEnhancedDocuments.Count > 0 && dvc.MyEnhancedDocuments[0].Type == 0; bool docVersionIsEnhanced = dvc.MyEnhancedDocuments != null && dvc.MyEnhancedDocuments.Count > 0 && dvc.MyEnhancedDocuments[0].Type == 0;
@@ -1622,7 +1638,7 @@ namespace Volian.Controls.Library
if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation. if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation.
if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click)); if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click));
} }
#endregion #endregion
} }
else else
{ {
@@ -1633,7 +1649,7 @@ namespace Volian.Controls.Library
{ {
SectionInfo si = (tn.VEObject as SectionInfo != null) ? tn.VEObject as SectionInfo : null; SectionInfo si = (tn.VEObject as SectionInfo != null) ? tn.VEObject as SectionInfo : null;
#region Menu_Paste_ToFromProcedure #region Menu_Paste_ToFromProcedure
if (iiPasteHere.IsProcedure && iiClipboard.IsProcedure) // procedure can be pasted before/replace/after if (iiPasteHere.IsProcedure && iiClipboard.IsProcedure) // procedure can be pasted before/replace/after
{ {
// Enhanced considerations, in order to paste a procedure around another procedure: NOTE that an 'enhanced' procedure cannot be in paste buffer! // Enhanced considerations, in order to paste a procedure around another procedure: NOTE that an 'enhanced' procedure cannot be in paste buffer!
// 1) 'to' & 'from' both 'non', i.e. Neither can have enhanced config data (be source or enhanced) // 1) 'to' & 'from' both 'non', i.e. Neither can have enhanced config data (be source or enhanced)
@@ -1657,16 +1673,16 @@ namespace Volian.Controls.Library
bool prFromIsEnhanced = iiClipboard.IsEnhancedProcedure; bool prFromIsEnhanced = iiClipboard.IsEnhancedProcedure;
bool prFromIsSource = pcFromCfg.MyEnhancedDocuments != null && pcFromCfg.MyEnhancedDocuments.Count > 0 && pcFromCfg.MyEnhancedDocuments[0].Type != 0; bool prFromIsSource = pcFromCfg.MyEnhancedDocuments != null && pcFromCfg.MyEnhancedDocuments.Count > 0 && pcFromCfg.MyEnhancedDocuments[0].Type != 0;
bool prCanPaste = false; bool prCanPaste = false;
if (!prToIsEnhanced && !prToIsSource && !prFromIsEnhanced && !prFromIsSource) prCanPaste = true; // 1) if (!prToIsEnhanced && !prToIsSource && !prFromIsEnhanced && !prFromIsSource) prCanPaste = true; // 1)
// else if ((!prToIsEnhanced && !prToIsSource) && prFromIsSource) prCanPaste = false; // 2) commented out because already set to false // else if ((!prToIsEnhanced && !prToIsSource) && prFromIsSource) prCanPaste = false; // 2) commented out because already set to false
else if (prToIsSource && !prFromIsEnhanced && !prFromIsSource) // 3) else if (prToIsSource && !prFromIsEnhanced && !prFromIsSource) // 3)
{ {
prCanPaste = true; prCanPaste = true;
okToReplace = false; okToReplace = false;
} }
else if (prToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) prCanPaste = true; // 4) else if (prToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) prCanPaste = true; // 4)
//else if (prToIsSource && iiPasteHere.MyDocVersion.VersionID != iiClipboard.MyDocVersion.VersionID) prCanPaste = false; // 5) commented out because already set to false //else if (prToIsSource && iiPasteHere.MyDocVersion.VersionID != iiClipboard.MyDocVersion.VersionID) prCanPaste = false; // 5) commented out because already set to false
//else if (prToIsEnhanced && prFromIsSource) prCanPaste = false; // 6)commented out because already set to false //else if (prToIsEnhanced && prFromIsSource) prCanPaste = false; // 6)commented out because already set to false
if (iiClipboard.IsRtfRaw) prCanPaste = okToReplace = prCanPaste = false; // never paste an equation. if (iiClipboard.IsRtfRaw) prCanPaste = okToReplace = prCanPaste = false; // never paste an equation.
if (prCanPaste) cm.MenuItems.Add("Paste Procedure Before", new EventHandler(mi_Click)); if (prCanPaste) cm.MenuItems.Add("Paste Procedure Before", new EventHandler(mi_Click));
if (okToReplace && prCanPaste) cm.MenuItems.Add("Replace Existing Procedure", new EventHandler(mi_Click)); if (okToReplace && prCanPaste) cm.MenuItems.Add("Replace Existing Procedure", new EventHandler(mi_Click));
@@ -1698,9 +1714,9 @@ namespace Volian.Controls.Library
bool scFromIsEnhanced = iiClipboard.IsEnhancedSection; bool scFromIsEnhanced = iiClipboard.IsEnhancedSection;
bool scFromIsSource = scFromCfg.MyEnhancedDocuments != null && scFromCfg.MyEnhancedDocuments.Count > 0 && scFromCfg.MyEnhancedDocuments[0].Type != 0; bool scFromIsSource = scFromCfg.MyEnhancedDocuments != null && scFromCfg.MyEnhancedDocuments.Count > 0 && scFromCfg.MyEnhancedDocuments[0].Type != 0;
bool scCanPaste = false; bool scCanPaste = false;
if (!prToIsEnhanced && !prToIsSource && !scFromIsEnhanced && !scFromIsSource) scCanPaste = true; // 1) if (!prToIsEnhanced && !prToIsSource && !scFromIsEnhanced && !scFromIsSource) scCanPaste = true; // 1)
else if (prToIsSource && !scFromIsEnhanced && !scFromIsSource) scCanPaste = true; else if (prToIsSource && !scFromIsEnhanced && !scFromIsSource) scCanPaste = true;
else if (prToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) scCanPaste = true; // 3) else if (prToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) scCanPaste = true; // 3)
if (iiClipboard.IsRtfRaw) scCanPaste = false; // never paste an equation. if (iiClipboard.IsRtfRaw) scCanPaste = false; // never paste an equation.
if (scCanPaste) cm.MenuItems.Add("Paste Section", new EventHandler(mi_Click)); if (scCanPaste) cm.MenuItems.Add("Paste Section", new EventHandler(mi_Click));
} }
@@ -1724,13 +1740,13 @@ namespace Volian.Controls.Library
bool secFromIsEnhanced = iiClipboard.IsEnhancedSection; bool secFromIsEnhanced = iiClipboard.IsEnhancedSection;
bool secFromIsSource = secFromCfg.MyEnhancedDocuments != null && secFromCfg.MyEnhancedDocuments.Count > 0 && secFromCfg.MyEnhancedDocuments[0].Type != 0; bool secFromIsSource = secFromCfg.MyEnhancedDocuments != null && secFromCfg.MyEnhancedDocuments.Count > 0 && secFromCfg.MyEnhancedDocuments[0].Type != 0;
bool secCanPaste = false; bool secCanPaste = false;
if (!secToIsEnhanced && !secToIsSource && !secFromIsEnhanced && !secFromIsSource) secCanPaste = true; // 1) if (!secToIsEnhanced && !secToIsSource && !secFromIsEnhanced && !secFromIsSource) secCanPaste = true; // 1)
else if (secToIsSource && !secFromIsEnhanced && !secFromIsSource) // 2) else if (secToIsSource && !secFromIsEnhanced && !secFromIsSource) // 2)
{ {
secCanPaste = true; secCanPaste = true;
okToReplace = false; okToReplace = false;
} }
else if (secToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) secCanPaste = true; // 3) else if (secToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) secCanPaste = true; // 3)
if (iiClipboard.IsRtfRaw) secCanPaste = okToReplace = false; // never paste an equation. if (iiClipboard.IsRtfRaw) secCanPaste = okToReplace = false; // never paste an equation.
if (secCanPaste) cm.MenuItems.Add("Paste Section Before", new EventHandler(mi_Click)); if (secCanPaste) cm.MenuItems.Add("Paste Section Before", new EventHandler(mi_Click));
if (okToReplace && secCanPaste) cm.MenuItems.Add("Replace Existing Section", new EventHandler(mi_Click)); if (okToReplace && secCanPaste) cm.MenuItems.Add("Replace Existing Section", new EventHandler(mi_Click));
@@ -1760,9 +1776,9 @@ namespace Volian.Controls.Library
bool stpFromIsEnhanced = iiClipboard.IsEnhancedStep; bool stpFromIsEnhanced = iiClipboard.IsEnhancedStep;
bool stpFromIsSource = stpFromCfg.MyEnhancedDocuments != null && stpFromCfg.MyEnhancedDocuments.Count > 0 && stpFromCfg.MyEnhancedDocuments[0].Type != 0; bool stpFromIsSource = stpFromCfg.MyEnhancedDocuments != null && stpFromCfg.MyEnhancedDocuments.Count > 0 && stpFromCfg.MyEnhancedDocuments[0].Type != 0;
bool stpCanPaste = false; bool stpCanPaste = false;
if (!secToIsEnhanced && !secToIsSource && !stpFromIsEnhanced && !stpFromIsSource) stpCanPaste = true; // 1) if (!secToIsEnhanced && !secToIsSource && !stpFromIsEnhanced && !stpFromIsSource) stpCanPaste = true; // 1)
else if (secToIsSource && !stpFromIsEnhanced && !stpFromIsSource) stpCanPaste = true; // 2) else if (secToIsSource && !stpFromIsEnhanced && !stpFromIsSource) stpCanPaste = true; // 2)
else if (secToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) stpCanPaste = true; // 3) else if (secToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) stpCanPaste = true; // 3)
if (iiClipboard.IsRtfRaw) stpCanPaste = false; // never paste an equation. if (iiClipboard.IsRtfRaw) stpCanPaste = false; // never paste an equation.
if (stpCanPaste) cm.MenuItems.Add("Paste Step", new EventHandler(mi_Click)); if (stpCanPaste) cm.MenuItems.Add("Paste Step", new EventHandler(mi_Click));
} }
@@ -1786,8 +1802,8 @@ namespace Volian.Controls.Library
bool stpFromIsEnhanced = iiClipboard.IsEnhancedStep; bool stpFromIsEnhanced = iiClipboard.IsEnhancedStep;
bool stpFromIsSource = stpFromCfg.MyEnhancedDocuments != null && stpFromCfg.MyEnhancedDocuments.Count > 0 && stpFromCfg.MyEnhancedDocuments[0].Type != 0; bool stpFromIsSource = stpFromCfg.MyEnhancedDocuments != null && stpFromCfg.MyEnhancedDocuments.Count > 0 && stpFromCfg.MyEnhancedDocuments[0].Type != 0;
bool stpCanPaste = false; bool stpCanPaste = false;
if (!stpToIsEnhanced && !stpToIsSource && !stpFromIsEnhanced && !stpFromIsSource) stpCanPaste = true; // 1) if (!stpToIsEnhanced && !stpToIsSource && !stpFromIsEnhanced && !stpFromIsSource) stpCanPaste = true; // 1)
else if (stpToIsSource && !stpFromIsEnhanced && !stpFromIsSource) // 2) else if (stpToIsSource && !stpFromIsEnhanced && !stpFromIsSource) // 2)
{ {
stpCanPaste = true; stpCanPaste = true;
okToReplace = false; okToReplace = false;
@@ -1795,7 +1811,7 @@ namespace Volian.Controls.Library
else if (stpToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) // 3 else if (stpToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) // 3
{ {
stpCanPaste = true; stpCanPaste = true;
if (stpFromIsSource) okToReplace = false; // B2017-183: don't allow a replace to source steps if (stpFromIsSource) okToReplace = false; // B2017-183: don't allow a replace to source steps
} }
if (iiClipboard.IsRtfRaw) stpCanPaste = false; // never paste an equation. if (iiClipboard.IsRtfRaw) stpCanPaste = false; // never paste an equation.
if (stpCanPaste && AddToInsertMenu(iiPasteHere, 0)) cm.MenuItems.Add("Paste Step Before", new EventHandler(mi_Click)); if (stpCanPaste && AddToInsertMenu(iiPasteHere, 0)) cm.MenuItems.Add("Paste Step Before", new EventHandler(mi_Click));
@@ -1825,7 +1841,7 @@ namespace Volian.Controls.Library
OnPrintSection(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag)); OnPrintSection(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break; break;
case "Print All Procedures for": case "Print All Procedures for":
OnPrintAllProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0,mi.Text,(int)mi.Tag)); OnPrintAllProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break; break;
case "Approve": case "Approve":
OnApproveProcedure(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag)); OnApproveProcedure(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
@@ -1837,10 +1853,10 @@ namespace Volian.Controls.Library
OnApproveSomeProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag)); OnApproveSomeProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break; break;
case "Create Continuous Action Summary": case "Create Continuous Action Summary":
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0,mi.Text,(int)mi.Tag)); OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break; break;
case "Create Time Critical Action Summary": case "Create Time Critical Action Summary":
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0,mi.Text,(int)mi.Tag)); OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break; break;
default: default:
if (mip.Text.StartsWith("Showing Change Bars Starting")) if (mip.Text.StartsWith("Showing Change Bars Starting"))
@@ -1878,7 +1894,7 @@ namespace Volian.Controls.Library
{ {
if (selprc.IsEnhancedProcedure) if (selprc.IsEnhancedProcedure)
{ {
selprc.DoUnlinkEnhanced(selprc, 0, !hasValidConnectingProc); // if no valid linked: enhtype = 0 since this an enhanced doc is getting unlinked selprc.DoUnlinkEnhanced(selprc, 0, !hasValidConnectingProc); // if no valid linked: enhtype = 0 since this an enhanced doc is getting unlinked
} }
else // from source else // from source
{ {
@@ -1886,7 +1902,7 @@ namespace Volian.Controls.Library
if (hasValidConnectingProc) if (hasValidConnectingProc)
{ {
ItemInfo lprc = ItemInfo.Get(seleds[0].ItemID); ItemInfo lprc = ItemInfo.Get(seleds[0].ItemID);
lprc.DoUnlinkEnhanced(lprc, 0, !hasValidConnectingProc); lprc.DoUnlinkEnhanced(lprc, 0, !hasValidConnectingProc);
} }
else else
selprc.DoUnlinkEnhanced(selprc, seleds[0].Type, !hasValidConnectingProc); selprc.DoUnlinkEnhanced(selprc, seleds[0].Type, !hasValidConnectingProc);
@@ -1906,7 +1922,7 @@ namespace Volian.Controls.Library
{ {
ItemInfo lprc = ItemInfo.Get(ed.ItemID); ItemInfo lprc = ItemInfo.Get(ed.ItemID);
bool hasValidConnectingProc = CheckForValidEnhLink(lprc); bool hasValidConnectingProc = CheckForValidEnhLink(lprc);
// if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure. // if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure.
if (hasValidConnectingProc) if (hasValidConnectingProc)
lprc.DoUnlinkEnhanced(lprc, ed.Type, !hasValidConnectingProc); lprc.DoUnlinkEnhanced(lprc, ed.Type, !hasValidConnectingProc);
else else
@@ -1930,27 +1946,27 @@ namespace Volian.Controls.Library
OnNodeSI(this, new vlnTreeEventArgs(tn, null, 0)); OnNodeSI(this, new vlnTreeEventArgs(tn, null, 0));
return; return;
} }
if (mi.Text.StartsWith("Collapse")) if (mi.Text.StartsWith("Collapse"))
{ {
CollapseProcedures(); CollapseProcedures();
return; return;
} }
if (mi.Text == "Print Transition Report") if (mi.Text == "Print Transition Report")
{ {
OnPrintTransitionReport(this, new vlnTreeEventArgs(SelectedNode as VETreeNode)); OnPrintTransitionReport(this, new vlnTreeEventArgs(SelectedNode as VETreeNode));
return; return;
} }
if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure") if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure")
{ {
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
return; return;
} }
if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure") if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure")
{ {
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1)); OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1));
return; return;
} }
if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to")) if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to"))
{ {
OnProcedureCheckedOutTo(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); OnProcedureCheckedOutTo(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
return; return;
@@ -1972,7 +1988,7 @@ namespace Volian.Controls.Library
break; break;
case "New Folder": case "New Folder":
SelectedNode.Expand(); SelectedNode.Expand();
tv_NodeNew(MenuSelections.Folder); tv_NodeNew(MenuSelections.Folder);
break; break;
case "Create Working Draft": case "Create Working Draft":
SelectedNode.Expand(); SelectedNode.Expand();
@@ -2016,7 +2032,7 @@ namespace Volian.Controls.Library
tv_NodeCopy(); tv_NodeCopy();
break; break;
// lots of paste options: // lots of paste options:
case "Paste Procedure": case "Paste Procedure":
case "Paste Procedure Before": case "Paste Procedure Before":
case "Paste Procedure After": case "Paste Procedure After":
case "Paste Section": case "Paste Section":
@@ -2041,7 +2057,7 @@ namespace Volian.Controls.Library
break; break;
} }
case "Delete": case "Delete":
if (tv_NodeDelete()) if (tv_NodeDelete())
{ {
@@ -2107,14 +2123,14 @@ namespace Volian.Controls.Library
UpdateROValues(SelectedNode as VETreeNode); UpdateROValues(SelectedNode as VETreeNode);
break; break;
case "Create Continuous Action Summary": case "Create Continuous Action Summary":
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0)); OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
break; break;
// F2022-024 Time Critical Action Summary // F2022-024 Time Critical Action Summary
case "Create Time Critical Action Summary": case "Create Time Critical Action Summary":
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0)); OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
break; break;
// B2017-243 added the following two Cannot Paste items when dealing with enhanced documents // B2017-243 added the following two Cannot Paste items when dealing with enhanced documents
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted // when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
case "CANNOT PASTE HERE. Click for more information...": case "CANNOT PASTE HERE. Click for more information...":
FlexibleMessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" + FlexibleMessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" +
"It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here"); "It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here");
@@ -2156,7 +2172,7 @@ namespace Volian.Controls.Library
foreach (VETreeNode tnc in tn.Nodes) foreach (VETreeNode tnc in tn.Nodes)
CollapseProcedures(tnc); CollapseProcedures(tnc);
if (tn.VEObject as DocVersionInfo == null && tn.VEObject as FolderInfo == null) if (tn.VEObject as DocVersionInfo == null && tn.VEObject as FolderInfo == null)
tn.Collapse(); tn.Collapse();
_doingCollapseNode = true; // B2016-058 this will prevent a Drag Node error when collapsing an RNOs, Cautions, or Notes tree node _doingCollapseNode = true; // B2016-058 this will prevent a Drag Node error when collapsing an RNOs, Cautions, or Notes tree node
} }
private void tv_RemoveChgIds() private void tv_RemoveChgIds()
@@ -2211,12 +2227,12 @@ namespace Volian.Controls.Library
FinalProgressBarMessage = "Cannot check-out Working Draft"; FinalProgressBarMessage = "Cannot check-out Working Draft";
return; return;
} }
Cursor = Cursors.WaitCursor; // C2023-002: move wait cursor after check out error Cursor = Cursors.WaitCursor; // C2023-002: move wait cursor after check out error
int ownerid = MySessionInfo.CheckOutItem(MyDVI.VersionID, CheckOutType.DocVersion); int ownerid = MySessionInfo.CheckOutItem(MyDVI.VersionID, CheckOutType.DocVersion);
using (DocVersion dv = DocVersion.Get(MyDVI.VersionID)) using (DocVersion dv = DocVersion.Get(MyDVI.VersionID))
{ {
swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(MyDVI)); // RO changes placed in file in the Documents\VEPROMS folder swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(MyDVI)); // RO changes placed in file in the Documents\VEPROMS folder
// B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo // B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo
if (dv.ROfstLoadingFigures || dv.NewerRoFst) // B2017-125 see if loading figures was completed if (dv.ROfstLoadingFigures || dv.NewerRoFst) // B2017-125 see if loading figures was completed
{ {
// only load the RO.fst // only load the RO.fst
@@ -2244,7 +2260,7 @@ namespace Volian.Controls.Library
swROUpdate.Write(string.Format("Fixed Referenced Object for {1}({4}){0}Old Text: {2}{0}New Text: {3}{0}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue, (sender as ItemInfo).ItemID)); swROUpdate.Write(string.Format("Fixed Referenced Object for {1}({4}){0}Old Text: {2}{0}New Text: {3}{0}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue, (sender as ItemInfo).ItemID));
} }
private ProgressBarItem _ProgressBar=null; private ProgressBarItem _ProgressBar = null;
public ProgressBarItem ProgressBar public ProgressBarItem ProgressBar
{ {
get { return _ProgressBar; } get { return _ProgressBar; }
@@ -2357,7 +2373,7 @@ namespace Volian.Controls.Library
return; return;
} }
// C2017-003: ro data in sql server, check for sql connection string // C2017-003: ro data in sql server, check for sql connection string
if (MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring") if (MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring")
roloc = roloc + " \"" + MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString + "\""; roloc = roloc + " \"" + MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString + "\"";
// C2021-026 pass in Parent/Child information (list of the children) // C2021-026 pass in Parent/Child information (list of the children)
// B2022-019 look at all DocVersions to find ParentChild information // B2022-019 look at all DocVersions to find ParentChild information
@@ -2422,7 +2438,7 @@ namespace Volian.Controls.Library
// assume that item to paste is a procedure, otherwise the menuing would not have // assume that item to paste is a procedure, otherwise the menuing would not have
// included the paste options // included the paste options
tn = (VETreeNode) tn.Nodes[tn.Nodes.Count - 1]; tn = (VETreeNode)tn.Nodes[tn.Nodes.Count - 1];
p = "After"; p = "After";
} }
else // this is an empty docversion: else // this is an empty docversion:
@@ -2451,7 +2467,7 @@ namespace Volian.Controls.Library
PasteAsChild(tn, iiClipboard.ItemID); PasteAsChild(tn, iiClipboard.ItemID);
//if (p.IndexOf("Replace") <= -1) //if (p.IndexOf("Replace") <= -1)
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
public void PasteAsDocVersionChild(VETreeNode tn, int copyStartID) public void PasteAsDocVersionChild(VETreeNode tn, int copyStartID)
@@ -2468,7 +2484,7 @@ namespace Volian.Controls.Library
} }
ItemInfo newProc = dvi.PasteChild(copyStartID); ItemInfo newProc = dvi.PasteChild(copyStartID);
VETreeNode tn1 = new VETreeNode(newProc); VETreeNode tn1 = new VETreeNode(newProc);
SelectedNode.Nodes.Add(tn1); // add tree node to end of list. SelectedNode.Nodes.Add(tn1); // add tree node to end of list.
SelectedNode = tn1; SelectedNode = tn1;
} }
@@ -2505,7 +2521,7 @@ namespace Volian.Controls.Library
} }
if (pasteSectIntoEmptySect) if (pasteSectIntoEmptySect)
{ {
tn.ChildrenLoaded = false; // force a reload of treenode tn.ChildrenLoaded = false; // force a reload of treenode
tn.LoadChildren(true); tn.LoadChildren(true);
} }
SelectedNode = tn; SelectedNode = tn;
@@ -2520,7 +2536,7 @@ namespace Volian.Controls.Library
// the item to be pasted in the step editor and the tree. // the item to be pasted in the step editor and the tree.
ItemInfo newItemInfo = null; ItemInfo newItemInfo = null;
// F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format // F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format
if (!ii.IsProcedure) if (!ii.IsProcedure)
ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, false); ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, false);
if (ii.IsProcedure || !OnPasteItemInfo(this, new vlnTreeItemInfoPasteEventArgs(ii, copyStartID, pasteOpt, ii.MyContent.Type))) if (ii.IsProcedure || !OnPasteItemInfo(this, new vlnTreeItemInfoPasteEventArgs(ii, copyStartID, pasteOpt, ii.MyContent.Type)))
{ {
@@ -2543,8 +2559,8 @@ namespace Volian.Controls.Library
} }
private void PasteReplace(VETreeNode tn, int copyStartID, TreeNode treeNodeReplace) private void PasteReplace(VETreeNode tn, int copyStartID, TreeNode treeNodeReplace)
{ {
VETreeNode prevtn = (VETreeNode) tn.PrevNode; VETreeNode prevtn = (VETreeNode)tn.PrevNode;
VETreeNode partn = (VETreeNode) tn.Parent; VETreeNode partn = (VETreeNode)tn.Parent;
ItemInfo ii = tn.VEObject as ItemInfo; ItemInfo ii = tn.VEObject as ItemInfo;
// F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format // F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format
ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, true); ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, true);
@@ -2563,7 +2579,7 @@ namespace Volian.Controls.Library
// B2018-047: was crashing on the following line (before change it was casting the result to a VETreeNote when the partn.FirstNode was just a TreeNode) // B2018-047: was crashing on the following line (before change it was casting the result to a VETreeNote when the partn.FirstNode was just a TreeNode)
SelectedNode = prevtn != null ? prevtn.NextNode : partn.FirstNode; SelectedNode = prevtn != null ? prevtn.NextNode : partn.FirstNode;
} }
public void PasteRepalceEmpty(VETreeNode tn, int copyStartID) public void PasteRepalceEmpty(VETreeNode tn, int copyStartID)
{ {
@@ -2582,7 +2598,7 @@ namespace Volian.Controls.Library
SelectedNode.Nodes.Add(tn1); // add tree node to end of list. SelectedNode.Nodes.Add(tn1); // add tree node to end of list.
SelectedNode = tn1; SelectedNode = tn1;
} }
private void tv_NodeCopy() private void tv_NodeCopy()
{ {
if (SelectedNode == null) return; if (SelectedNode == null) return;
VETreeNode tn = SelectedNode as VETreeNode; VETreeNode tn = SelectedNode as VETreeNode;
@@ -2594,7 +2610,7 @@ namespace Volian.Controls.Library
private void SetupNodeProperties() private void SetupNodeProperties()
{ {
VETreeNode tn = SelectedNode as VETreeNode; VETreeNode tn = SelectedNode as VETreeNode;
if (tn==null)return; if (tn == null) return;
if ((tn.VEObject as FolderInfo) != null) if ((tn.VEObject as FolderInfo) != null)
OpenProperties(tn.VEObject as FolderInfo); OpenProperties(tn.VEObject as FolderInfo);
@@ -2606,7 +2622,7 @@ namespace Volian.Controls.Library
if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0) rofstid = dvi.DocVersionAssociations[0].MyROFst.ROFstID; if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0) rofstid = dvi.DocVersionAssociations[0].MyROFst.ROFstID;
OpenProperties(tn.VEObject as DocVersionInfo); OpenProperties(tn.VEObject as DocVersionInfo);
if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0 && rofstid != dvi.DocVersionAssociations[0].MyROFst.ROFstID) if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0 && rofstid != dvi.DocVersionAssociations[0].MyROFst.ROFstID)
OnTabDisplay(this,new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST")); OnTabDisplay(this, new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"));
} }
else if ((tn.VEObject as ProcedureInfo) != null) else if ((tn.VEObject as ProcedureInfo) != null)
OpenProperties(tn.VEObject as ProcedureInfo); OpenProperties(tn.VEObject as ProcedureInfo);
@@ -2620,7 +2636,7 @@ namespace Volian.Controls.Library
{ {
using (Folder folder = folderInfo.Get()) using (Folder folder = folderInfo.Get())
{ {
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig)); OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig));
} }
} }
private void OpenProperties(DocVersionInfo dvInfo) private void OpenProperties(DocVersionInfo dvInfo)
@@ -2634,7 +2650,7 @@ namespace Volian.Controls.Library
{ {
using (Procedure proc = procInfo.Get()) using (Procedure proc = procInfo.Get())
{ {
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig)); OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig));
} }
} }
private void OpenProperties(SectionInfo sectInfo) private void OpenProperties(SectionInfo sectInfo)
@@ -2647,7 +2663,7 @@ namespace Volian.Controls.Library
title = string.Format("{0} {1} Properties", sectInfo.SectionConfig.Number, sectInfo.SectionConfig.Title); title = string.Format("{0} {1} Properties", sectInfo.SectionConfig.Number, sectInfo.SectionConfig.Title);
else else
title = string.Format("{0} Properties", sectInfo.SectionConfig.Title); title = string.Format("{0} Properties", sectInfo.SectionConfig.Title);
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig)); OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig));
} }
} }
private void OpenProperties(StepInfo stpinfo) private void OpenProperties(StepInfo stpinfo)
@@ -2701,7 +2717,7 @@ namespace Volian.Controls.Library
{ {
if (newtype == MenuSelections.DocVersion) if (newtype == MenuSelections.DocVersion)
{ {
int dvid = -1; // flag to allow user to cancel from dialog & then we remove it. int dvid = -1; // flag to allow user to cancel from dialog & then we remove it.
using (DocVersion docversion = DocVersion.MakeDocVersion(parentfolder, "Working Draft", "Title", null, null, null)) using (DocVersion docversion = DocVersion.MakeDocVersion(parentfolder, "Working Draft", "Title", null, null, null))
{ {
ShowBrokenRules(docversion.BrokenRulesCollection); ShowBrokenRules(docversion.BrokenRulesCollection);
@@ -2710,7 +2726,7 @@ namespace Volian.Controls.Library
{ {
docversion.Save(); docversion.Save();
tn = new VETreeNode(_LastDocVersionInfo); tn = new VETreeNode(_LastDocVersionInfo);
SelectedNode.Nodes.Add(tn); // add tree node to end of list. SelectedNode.Nodes.Add(tn); // add tree node to end of list.
parentfolder.Reset_ChildFolders(); parentfolder.Reset_ChildFolders();
parentfolder.Reset_FolderDocVersions(); parentfolder.Reset_FolderDocVersions();
} }
@@ -2721,7 +2737,7 @@ namespace Volian.Controls.Library
} }
else if (newtype == MenuSelections.Folder) else if (newtype == MenuSelections.Folder)
{ {
int f1 = -1; // flag to allow user to cancel from dialog & then we remove it. int f1 = -1; // flag to allow user to cancel from dialog & then we remove it.
string uniquename = _LastFolderInfo.UniqueChildName("New Folder"); string uniquename = _LastFolderInfo.UniqueChildName("New Folder");
using (Folder folder = Folder.MakeFolder(parentfolder, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, string.Empty, DateTime.Now, VlnSettings.UserID)) using (Folder folder = Folder.MakeFolder(parentfolder, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, string.Empty, DateTime.Now, VlnSettings.UserID))
{ {
@@ -2733,20 +2749,20 @@ namespace Volian.Controls.Library
{ {
folder.Save(); folder.Save();
tn = new VETreeNode((IVEDrillDownReadOnly)_LastFolderInfo); tn = new VETreeNode((IVEDrillDownReadOnly)_LastFolderInfo);
SelectedNode.Nodes.Add(tn); // add new tree node to end of childlist. SelectedNode.Nodes.Add(tn); // add new tree node to end of childlist.
} }
else else
f1 = folder.FolderID; f1 = folder.FolderID;
} }
if (f1 != -1) Folder.Delete(f1); if (f1 != -1) Folder.Delete(f1);
} }
else if (newtype == MenuSelections.FolderAfter||newtype == MenuSelections.FolderBefore) else if (newtype == MenuSelections.FolderAfter || newtype == MenuSelections.FolderBefore)
{ {
int f2 = -1; int f2 = -1;
string uniquename = _LastFolderInfo.MyParent.UniqueChildName("New Folder"); string uniquename = _LastFolderInfo.MyParent.UniqueChildName("New Folder");
int myindex = SelectedNode.Index + ((newtype == MenuSelections.FolderAfter) ? 1 : 0); int myindex = SelectedNode.Index + ((newtype == MenuSelections.FolderAfter) ? 1 : 0);
FolderInfo parfolderinfo = FolderInfo.Get(parentfolder.FolderID); FolderInfo parfolderinfo = FolderInfo.Get(parentfolder.FolderID);
double? myorder = parfolderinfo.NewManualOrder(myindex); double? myorder = parfolderinfo.NewManualOrder(myindex);
using (Folder folder = Folder.MakeFolder(parentfolder.MyParent, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, myorder, string.Empty, DateTime.Now, VlnSettings.UserID)) using (Folder folder = Folder.MakeFolder(parentfolder.MyParent, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, myorder, string.Empty, DateTime.Now, VlnSettings.UserID))
{ {
ShowBrokenRules(folder.BrokenRulesCollection); ShowBrokenRules(folder.BrokenRulesCollection);
@@ -2770,7 +2786,7 @@ namespace Volian.Controls.Library
else if (newtype == MenuSelections.Procedure) else if (newtype == MenuSelections.Procedure)
{ {
int p1 = -1; int p1 = -1;
using (Procedure procedure = Procedure.MakeProcedure(_LastDocVersionInfo, _LastDocVersionInfo.Procedures.Count!=0?_LastDocVersionInfo.Procedures[_LastDocVersionInfo.Procedures.Count-1]:null, null, "New Procedure", 0)) using (Procedure procedure = Procedure.MakeProcedure(_LastDocVersionInfo, _LastDocVersionInfo.Procedures.Count != 0 ? _LastDocVersionInfo.Procedures[_LastDocVersionInfo.Procedures.Count - 1] : null, null, "New Procedure", 0))
{ {
ShowBrokenRules(procedure.BrokenRulesCollection); ShowBrokenRules(procedure.BrokenRulesCollection);
SetLastValues(ProcedureInfo.Get(procedure.ItemID)); SetLastValues(ProcedureInfo.Get(procedure.ItemID));
@@ -2779,8 +2795,8 @@ namespace Volian.Controls.Library
{ {
procedure.Save(); procedure.Save();
tn = new VETreeNode(_LastProcedureInfo); tn = new VETreeNode(_LastProcedureInfo);
SelectedNode.Nodes.Add(tn); // add tree node to end of list. SelectedNode.Nodes.Add(tn); // add tree node to end of list.
// The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034) // The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034)
if (((SelectedNode as VETreeNode).VEObject as DocVersionInfo) != null) ((SelectedNode as VETreeNode).VEObject as DocVersionInfo).ResetProcedures(); if (((SelectedNode as VETreeNode).VEObject as DocVersionInfo) != null) ((SelectedNode as VETreeNode).VEObject as DocVersionInfo).ResetProcedures();
if (procedure.MyProcedureInfo.CreateEnhanced) if (procedure.MyProcedureInfo.CreateEnhanced)
{ {
@@ -2822,21 +2838,21 @@ namespace Volian.Controls.Library
else else
p2 = procedure.ItemID; p2 = procedure.ItemID;
} }
if (p2 != -1) if (p2 != -1)
DeleteItemInfoAndChildren(_LastProcedureInfo); // Delete Item and reset Previous and Next DeleteItemInfoAndChildren(_LastProcedureInfo); // Delete Item and reset Previous and Next
} }
#endregion #endregion
#region InsertSection #region InsertSection
else if (newtype == MenuSelections.Section) // Insert subsection at end of parents section list else if (newtype == MenuSelections.Section) // Insert subsection at end of parents section list
{ {
string message = string.Empty; string message = string.Empty;
if (_LastProcedureInfo != null) if (_LastProcedureInfo != null)
if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message)) if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message))
{ {
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
OnUnPauseRefresh(this, null); OnUnPauseRefresh(this, null);
return; return;
} }
int s1 = -1; int s1 = -1;
if (!(_LastProcedureInfo == null) || !(_LastSectionInfo == null)) if (!(_LastProcedureInfo == null) || !(_LastSectionInfo == null))
{ {
@@ -2866,7 +2882,7 @@ namespace Volian.Controls.Library
"If you would like to view or copy these hidden steps you will need to go\n" + "If you would like to view or copy these hidden steps you will need to go\n" +
"into the properties of this section and check the Editable Data checkbox.\n" + "into the properties of this section and check the Editable Data checkbox.\n" +
"You will then be able to view and copy those steps. When finished, open\n" + "You will then be able to view and copy those steps. When finished, open\n" +
"the properties page again and uncheck the Editable Data checkbox.\n\n"+ "the properties page again and uncheck the Editable Data checkbox.\n\n" +
"Do you want to continue creating the subsection?"; "Do you want to continue creating the subsection?";
if (FlexibleMessageBox.Show(this, msgstr, "Subsection Insert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) if (FlexibleMessageBox.Show(this, msgstr, "Subsection Insert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{ {
@@ -2878,7 +2894,7 @@ namespace Volian.Controls.Library
if (!hasMetaSubs) doPseudo = true; if (!hasMetaSubs) doPseudo = true;
} }
} }
using(Section section = CreateNewSection()) using (Section section = CreateNewSection())
{ {
ShowBrokenRules(section.BrokenRulesCollection); ShowBrokenRules(section.BrokenRulesCollection);
SectionInfo savLastSectionInfo = _LastSectionInfo; SectionInfo savLastSectionInfo = _LastSectionInfo;
@@ -2888,10 +2904,10 @@ namespace Volian.Controls.Library
if (!doPseudo) if (!doPseudo)
{ {
tn = new VETreeNode(_LastSectionInfo); tn = new VETreeNode(_LastSectionInfo);
SelectedNode.Nodes.Add(tn); // add tree node to end of list. SelectedNode.Nodes.Add(tn); // add tree node to end of list.
// if the new section was flagged as either having an enhanced link for Title or Contents, create the // if the new section was flagged as either having an enhanced link for Title or Contents, create the
// Enhanced section: // Enhanced section:
Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem. Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem.
if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y") if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y")
CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text); CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text);
sectiontmp.Dispose(); sectiontmp.Dispose();
@@ -2902,7 +2918,7 @@ namespace Volian.Controls.Library
// may have to add a 'steps' node if a step(s) already exist... // may have to add a 'steps' node if a step(s) already exist...
ItemInfo ii = (SelectedNode as VETreeNode).VEObject as ItemInfo; ItemInfo ii = (SelectedNode as VETreeNode).VEObject as ItemInfo;
int cpindx = 0; int cpindx = 0;
if (SelectedNode.Nodes.Count>0) if (SelectedNode.Nodes.Count > 0)
{ {
VETreeNode vtn = SelectedNode.Nodes[0] as VETreeNode; VETreeNode vtn = SelectedNode.Nodes[0] as VETreeNode;
// B2017-014: removed code that was adding a 2nd section part node. and also select node to // B2017-014: removed code that was adding a 2nd section part node. and also select node to
@@ -2912,13 +2928,13 @@ namespace Volian.Controls.Library
// B2017-014: removed code that was adding a 2nd section part node. // B2017-014: removed code that was adding a 2nd section part node.
} }
} }
else // Properties was canceled out of: else // Properties was canceled out of:
s1 = section.ItemID; s1 = section.ItemID;
} }
if (s1 != -1) if (s1 != -1)
{ {
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
// B2020-087 refresh the tree node after canceling the creation of the subsection // B2020-087 refresh the tree node after canceling the creation of the subsection
_LastTreeNode.ChildrenLoaded = false; _LastTreeNode.ChildrenLoaded = false;
_LastTreeNode.RefreshNode(); _LastTreeNode.RefreshNode();
_LastTreeNode.Collapse(); _LastTreeNode.Collapse();
@@ -2946,14 +2962,14 @@ namespace Volian.Controls.Library
if (OnNodeOpenProperty(this, new vlnTreePropertyEventArgs("New Section", section.SectionConfig)) == DialogResult.OK) if (OnNodeOpenProperty(this, new vlnTreePropertyEventArgs("New Section", section.SectionConfig)) == DialogResult.OK)
{ {
int indx = tvindex + ((newtype == MenuSelections.SectionBefore) ? 0 : 1); int indx = tvindex + ((newtype == MenuSelections.SectionBefore) ? 0 : 1);
int itemido = (indx >= par.Nodes.Count)?-1:(((par.Nodes[indx] as VETreeNode).VEObject) as ItemInfo).ItemID; int itemido = (indx >= par.Nodes.Count) ? -1 : (((par.Nodes[indx] as VETreeNode).VEObject) as ItemInfo).ItemID;
if (indx >= par.Nodes.Count || (par.Nodes[indx] as VETreeNode).VEObject.ToString() != _LastSectionInfo.ToString() || itemido !=section.ItemID) if (indx >= par.Nodes.Count || (par.Nodes[indx] as VETreeNode).VEObject.ToString() != _LastSectionInfo.ToString() || itemido != section.ItemID)
{ {
tn = new VETreeNode(_LastSectionInfo); tn = new VETreeNode(_LastSectionInfo);
par.Nodes.Insert(indx, tn); par.Nodes.Insert(indx, tn);
// if the new section was flagged as either having an enhanced link for Title or Contents, create the // if the new section was flagged as either having an enhanced link for Title or Contents, create the
// Enhanced section: // Enhanced section:
Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem. Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem.
if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y") if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y")
CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text); CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text);
sectiontmp.Dispose(); sectiontmp.Dispose();
@@ -2965,7 +2981,7 @@ namespace Volian.Controls.Library
if (s2 != -1) if (s2 != -1)
{ {
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
// B2020-087 refresh the tree node after canceling the creation of the subsection // B2020-087 refresh the tree node after canceling the creation of the subsection
_LastTreeNode.ChildrenLoaded = false; _LastTreeNode.ChildrenLoaded = false;
_LastTreeNode.RefreshNode(); _LastTreeNode.RefreshNode();
_LastTreeNode.Collapse(); _LastTreeNode.Collapse();
@@ -2973,7 +2989,7 @@ namespace Volian.Controls.Library
} }
#endregion #endregion
#region InsertStep #region InsertStep
else if (newtype == MenuSelections.Step) // insert step from section - no substeps from tree. else if (newtype == MenuSelections.Step) // insert step from section - no substeps from tree.
{ {
string message = string.Empty; string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message)) if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
@@ -3050,7 +3066,7 @@ namespace Volian.Controls.Library
using (Procedure newenhProcedure = Procedure.MakeProcedure(enhDVInfo, enhDVInfo.Procedures.Count != 0 ? enhDVInfo.Procedures[enhDVInfo.Procedures.Count - 1] : null, null, "New Procedure", 0)) using (Procedure newenhProcedure = Procedure.MakeProcedure(enhDVInfo, enhDVInfo.Procedures.Count != 0 ? enhDVInfo.Procedures[enhDVInfo.Procedures.Count - 1] : null, null, "New Procedure", 0))
{ {
SaveEnhancedForProcedure(sourceProc, newenhProcedure, ded.Type); SaveEnhancedForProcedure(sourceProc, newenhProcedure, ded.Type);
RefreshRelatedNode(ProcedureInfo.Get(newenhProcedure.ItemID)); // this updates the treeview to include the new enhanced procedure RefreshRelatedNode(ProcedureInfo.Get(newenhProcedure.ItemID)); // this updates the treeview to include the new enhanced procedure
} }
} }
} }
@@ -3148,7 +3164,7 @@ namespace Volian.Controls.Library
{ {
SectionConfig newenhcfg = new SectionConfig(newenhSection); SectionConfig newenhcfg = new SectionConfig(newenhSection);
newenhcfg.AddEnhancedDocument(0, sourceSect.ItemID); newenhcfg.AddEnhancedDocument(0, sourceSect.ItemID);
newenhcfg.SaveEnhancedDocuments(); // does this save data? newenhcfg.SaveEnhancedDocuments(); // does this save data?
using (Content c1 = Content.Get(newenhSection.ContentID)) using (Content c1 = Content.Get(newenhSection.ContentID))
{ {
c1.Config = newenhcfg.ToString(); c1.Config = newenhcfg.ToString();
@@ -3162,7 +3178,7 @@ namespace Volian.Controls.Library
cs.Save(); cs.Save();
} }
} }
private Section CreateNewSection() private Section CreateNewSection()
{ {
// B2020-087 the config for SubSection_Edit was sometimes set even when there wasn't any subsections, // B2020-087 the config for SubSection_Edit was sometimes set even when there wasn't any subsections,
@@ -3202,7 +3218,7 @@ namespace Volian.Controls.Library
// The parent step was not open in the step editor, just create new step(s) and add treenode. // The parent step was not open in the step editor, just create new step(s) and add treenode.
int newId = -1; int newId = -1;
// B2020-076: if this step has a template, insert template steps. // B2020-076: if this step has a template, insert template steps.
int topType = ii.GetSmartTemplateTopLevelIndxOfThisType(20002); int topType = ii.GetSmartTemplateTopLevelIndxOfThisType(20002);
if (topType != -1) if (topType != -1)
{ {
ItemInfo tmp = null; ItemInfo tmp = null;
@@ -3229,12 +3245,12 @@ namespace Volian.Controls.Library
// see if enhanced related steps need created: // see if enhanced related steps need created:
SectionConfig scfgE = _LastItemInfo.ActiveSection.MyConfig as SectionConfig; // C2018-003 fixed use of getting the active section SectionConfig scfgE = _LastItemInfo.ActiveSection.MyConfig as SectionConfig; // C2018-003 fixed use of getting the active section
if (scfgE != null && scfgE.Section_LnkEnh=="Y") if (scfgE != null && scfgE.Section_LnkEnh == "Y")
{ {
// set up which item to insert from based on whether editor was open (see comment from 11/17 above). // set up which item to insert from based on whether editor was open (see comment from 11/17 above).
EnhancedDocuments enhdocs = null; EnhancedDocuments enhdocs = null;
ItemInfo.EAddpingPart addpart = ItemInfo.EAddpingPart.Child; ItemInfo.EAddpingPart addpart = ItemInfo.EAddpingPart.Child;
if (_LastItemInfo.MyPrevious != null) // the code above will do the MakeStep regardless of whether editor is up if this is the only step. if (_LastItemInfo.MyPrevious != null) // the code above will do the MakeStep regardless of whether editor is up if this is the only step.
{ {
addpart = ItemInfo.EAddpingPart.After; addpart = ItemInfo.EAddpingPart.After;
ItemInfo lstSrc = _LastItemInfo.MyPrevious; ItemInfo lstSrc = _LastItemInfo.MyPrevious;
@@ -3406,7 +3422,7 @@ namespace Volian.Controls.Library
result = FlexibleMessageBox.Show("Are you sure you want to delete this " + typeDescription + "?", "Verify Delete", result = FlexibleMessageBox.Show("Are you sure you want to delete this " + typeDescription + "?", "Verify Delete",
MessageBoxButtons.YesNo, MessageBoxIcon.Question); MessageBoxButtons.YesNo, MessageBoxIcon.Question);
} }
if (_LastProcedureInfo != null || result == DialogResult.Yes) if (_LastProcedureInfo != null || result == DialogResult.Yes)
{ {
if (_LastFolderInfo != null) if (_LastFolderInfo != null)
{ {
@@ -3422,7 +3438,7 @@ namespace Volian.Controls.Library
{ {
foreach (DVEnhancedDocument dve in dvc.MyEnhancedDocuments) foreach (DVEnhancedDocument dve in dvc.MyEnhancedDocuments)
{ {
if (dve.Type != 0) if (dve.Type != 0)
DocVersion.Delete(dve.VersionID); DocVersion.Delete(dve.VersionID);
else else
{ {
@@ -3468,7 +3484,7 @@ namespace Volian.Controls.Library
if (ed.Type != 0) enhIds.Add(ed.ItemID); if (ed.Type != 0) enhIds.Add(ed.ItemID);
// always return false because an event gets fired to delete tree nodes. // always return false because an event gets fired to delete tree nodes.
if (!DeleteItemInfoAndChildren(_LastProcedureInfo)) return false; if (!DeleteItemInfoAndChildren(_LastProcedureInfo)) return false;
_LastProcedureInfo = null; _LastProcedureInfo = null;
foreach (int enhId in enhIds) foreach (int enhId in enhIds)
{ {
@@ -3512,7 +3528,7 @@ namespace Volian.Controls.Library
// just clear enhanced links back // just clear enhanced links back
_LastSectionInfo.ClearEnhancedSectionLink(); _LastSectionInfo.ClearEnhancedSectionLink();
} }
OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(_LastSectionInfo,true)); OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(_LastSectionInfo, true));
// always return false because an event gets fired to delete tree nodes. // always return false because an event gets fired to delete tree nodes.
if (!DeleteItemInfoAndChildren(_LastSectionInfo)) if (!DeleteItemInfoAndChildren(_LastSectionInfo))
{ {
@@ -3567,6 +3583,41 @@ namespace Volian.Controls.Library
} }
return false; return false;
} }
public void RemoveFolder(int folderId)
{
TreeNode nodeToRemove = FindNodeById(folderId, this.Nodes);
if (nodeToRemove != null)
{
// Perform the removal logic
nodeToRemove.Remove(); // This removes the node from its parent
}
}
private TreeNode FindNodeById(int folderId, TreeNodeCollection nodes)
{
foreach (TreeNode node in nodes)
{
VETreeNode vetNode = node as VETreeNode;
if (vetNode != null)
{
FolderInfo folderInfo = vetNode.VEObject as FolderInfo;
if (folderInfo != null && folderInfo.FolderID == folderId)
{
return node;
}
else
{
TreeNode foundNode = FindNodeById(folderId, node.Nodes);
if (foundNode != null)
{
return foundNode;
}
}
}
}
return null;
}
private bool DeleteItemInfoAndChildren(ItemInfo ii) private bool DeleteItemInfoAndChildren(ItemInfo ii)
{ {
DateTime dtStart = DateTime.Now; DateTime dtStart = DateTime.Now;