Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
c05e493579 | |||
2714973c16 | |||
5f86d8c629 | |||
977ea6f5fc | |||
a8bbda1281 | |||
da1b061eb1 | |||
4644699df0 | |||
6e6abbd759 |
@ -23519,6 +23519,90 @@ 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 |
|
||||
@ -23552,8 +23636,8 @@ BEGIN TRY -- Try Block
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
|
||||
set @RevDate = '07/18/2024 11:24'
|
||||
set @RevDescription = 'C2024-005 Add an Admin tool that can delete a group of annotations.'
|
||||
set @RevDate = '07/29/2024 11:24'
|
||||
set @RevDescription = 'C2021-059 Add SQL for Admin tool delete folders.'
|
||||
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||
|
415
PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs
generated
415
PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs
generated
@ -59,6 +59,17 @@
|
||||
this.labelX14 = new DevComponents.DotNetBar.LabelX();
|
||||
this.myTVdel = new System.Windows.Forms.TreeView();
|
||||
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.warningBox3 = new DevComponents.DotNetBar.Controls.WarningBox();
|
||||
this.labelX7 = new DevComponents.DotNetBar.LabelX();
|
||||
@ -86,17 +97,8 @@
|
||||
this.labelX8 = new DevComponents.DotNetBar.LabelX();
|
||||
this.line2 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.btnRunRepair = 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.sideNavPanel5 = new DevComponents.DotNetBar.Controls.SideNavPanel();
|
||||
this.btn_ShowUsers = new DevComponents.DotNetBar.ButtonX();
|
||||
this.sideNavItem1 = new DevComponents.DotNetBar.Controls.SideNavItem();
|
||||
this.separator1 = new DevComponents.DotNetBar.Separator();
|
||||
this.sideNavItmCheck = new DevComponents.DotNetBar.Controls.SideNavItem();
|
||||
@ -126,9 +128,10 @@
|
||||
this.panelEx1.SuspendLayout();
|
||||
this.sideNav1.SuspendLayout();
|
||||
this.sideNavPanel4.SuspendLayout();
|
||||
this.sideNavPanel3.SuspendLayout();
|
||||
this.sideNavPanel1.SuspendLayout();
|
||||
this.sideNavPanel2.SuspendLayout();
|
||||
this.sideNavPanel3.SuspendLayout();
|
||||
this.sideNavPanel5.SuspendLayout();
|
||||
this.panelEx4.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@ -138,9 +141,10 @@
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
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.Size = new System.Drawing.Size(183, 226);
|
||||
this.myTV.Size = new System.Drawing.Size(291, 310);
|
||||
this.myTV.TabIndex = 4;
|
||||
this.myTV.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck);
|
||||
//
|
||||
@ -465,9 +469,10 @@
|
||||
//
|
||||
this.sideNav1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.sideNav1.Controls.Add(this.sideNavPanel4);
|
||||
this.sideNav1.Controls.Add(this.sideNavPanel3);
|
||||
this.sideNav1.Controls.Add(this.sideNavPanel1);
|
||||
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.EnableClose = false;
|
||||
this.sideNav1.EnableMaximize = false;
|
||||
@ -501,6 +506,31 @@
|
||||
this.sideNavPanel4.Size = new System.Drawing.Size(291, 494);
|
||||
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
|
||||
//
|
||||
//
|
||||
@ -561,7 +591,7 @@
|
||||
this.labelX14.Location = new System.Drawing.Point(85, 14);
|
||||
this.labelX14.Name = "labelX14";
|
||||
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.Text = "Delete Annotations";
|
||||
//
|
||||
@ -571,27 +601,194 @@
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
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.Size = new System.Drawing.Size(267, 331);
|
||||
this.myTVdel.Size = new System.Drawing.Size(291, 367);
|
||||
this.myTVdel.TabIndex = 34;
|
||||
//
|
||||
// btnDeleteItems
|
||||
//
|
||||
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.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.Size = new System.Drawing.Size(280, 23);
|
||||
this.btnDeleteItems.Size = new System.Drawing.Size(212, 23);
|
||||
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" +
|
||||
" 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.Text = "Process Deletions";
|
||||
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
|
||||
//
|
||||
this.sideNavPanel1.Controls.Add(this.warningBox3);
|
||||
@ -1009,170 +1206,6 @@
|
||||
this.btnRunRepair.Text = "Run Repair";
|
||||
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
|
||||
//
|
||||
this.sideNavItem1.IsSystemMenu = true;
|
||||
@ -1217,8 +1250,7 @@
|
||||
// sideNavItmUsers
|
||||
//
|
||||
this.sideNavItmUsers.Name = "sideNavItmUsers";
|
||||
this.sideNavItmUsers.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
||||
this.buttonItem1});
|
||||
this.sideNavItmUsers.Panel = this.sideNavPanel5;
|
||||
this.sideNavItmUsers.Symbol = "";
|
||||
this.sideNavItmUsers.Text = "Users";
|
||||
this.sideNavItmUsers.Click += new System.EventHandler(this.sideNavItmUsers_Click);
|
||||
@ -1364,9 +1396,10 @@
|
||||
this.sideNav1.ResumeLayout(false);
|
||||
this.sideNav1.PerformLayout();
|
||||
this.sideNavPanel4.ResumeLayout(false);
|
||||
this.sideNavPanel3.ResumeLayout(false);
|
||||
this.sideNavPanel1.ResumeLayout(false);
|
||||
this.sideNavPanel2.ResumeLayout(false);
|
||||
this.sideNavPanel3.ResumeLayout(false);
|
||||
this.sideNavPanel5.ResumeLayout(false);
|
||||
this.panelEx4.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@ -1416,6 +1449,8 @@
|
||||
private DevComponents.DotNetBar.LabelX labelX8;
|
||||
private DevComponents.DotNetBar.Controls.Line line2;
|
||||
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.ButtonX btnFixLinks;
|
||||
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItem1;
|
||||
@ -1461,5 +1496,3 @@
|
||||
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmDelete;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,16 +24,23 @@ namespace VEPROMS
|
||||
private bool IsAdministratorUser = false; //C2020-035 used to control what Set Amins can do
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// pass in session info to constructor
|
||||
public frmBatchRefresh(SessionInfo sessionInfo)
|
||||
|
||||
private frmVEPROMS _veProms;
|
||||
|
||||
public frmBatchRefresh(SessionInfo sessionInfo, frmVEPROMS veProms)
|
||||
{
|
||||
InitializeComponent();
|
||||
_MySessionInfo = sessionInfo;
|
||||
_veProms = veProms;
|
||||
|
||||
if (sideNavItmDelete.Checked)
|
||||
{
|
||||
AdminToolType = (E_AdminToolType)4;
|
||||
if (swDeleteFolder.Value)
|
||||
{
|
||||
ResetDelTV(true);
|
||||
setupProgessSteps1();
|
||||
}
|
||||
else
|
||||
ResetDelTV(false);
|
||||
}
|
||||
@ -91,6 +98,7 @@ namespace VEPROMS
|
||||
|
||||
private Dictionary<TreeNode, ProcedureInfo> myProcedures = new Dictionary<TreeNode, ProcedureInfo>();
|
||||
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)
|
||||
{
|
||||
IsClosing = false;//B2017-221 Allow the batch dialog to close when waiting to process.
|
||||
@ -133,6 +141,8 @@ namespace VEPROMS
|
||||
//myTreeNodePath = new List<string>();
|
||||
myTV.Nodes.Clear();
|
||||
myDocVersions.Clear();
|
||||
myFolders.Clear();
|
||||
|
||||
FolderInfo fi = FolderInfo.GetTop();
|
||||
TreeNode tn = myTV.Nodes.Add(fi.Name);
|
||||
tn.Tag = fi;
|
||||
@ -155,12 +165,6 @@ namespace VEPROMS
|
||||
FolderInfo fi = FolderInfo.GetTop();
|
||||
|
||||
if (fi.ChildFolderCount > 0)
|
||||
{
|
||||
if (noProcs)
|
||||
{
|
||||
LoadBottomLevelFolders(fi, myTVdel);
|
||||
}
|
||||
else
|
||||
{
|
||||
TreeNode tn = new TreeNode(fi.Name);
|
||||
tn.Tag = fi;
|
||||
@ -168,87 +172,68 @@ namespace VEPROMS
|
||||
LoadChildFolders(fi, tn, noProcs);
|
||||
myTVdel.Nodes.Add(tn);
|
||||
}
|
||||
}
|
||||
|
||||
if (myTVdel.SelectedNode != null)
|
||||
myTVdel.SelectedNode.Expand();
|
||||
this.Cursor = Cursors.Default;
|
||||
|
||||
//btnFixLinks.Enabled = false;
|
||||
//this.Cursor = Cursors.WaitCursor;
|
||||
////myTreeNodePath = new List<string>();
|
||||
//myTVdel.Nodes.Clear();
|
||||
//myDocVersions.Clear();
|
||||
//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;
|
||||
//Expand if folders
|
||||
if (noProcs)
|
||||
myTVdel.ExpandAll();
|
||||
|
||||
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
|
||||
private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
|
||||
{
|
||||
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)
|
||||
{
|
||||
TreeNode tnc = tn.Nodes.Add(fic.Name);
|
||||
tnc.Tag = fic;
|
||||
|
||||
if (fic.ChildFolderCount > 0)
|
||||
{
|
||||
if (LoadChildFolders(fic, tnc, noProcs))
|
||||
{
|
||||
loadedChildWorkingDraft = true;
|
||||
// B2020-114 and C2020-035 only show folders the Set Admin can access
|
||||
}
|
||||
}
|
||||
|
||||
if (fic.FolderDocVersionCount > 0)
|
||||
{
|
||||
if (!LoadDocVersions(fic, tnc, noProcs))
|
||||
{
|
||||
tnc.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
{
|
||||
if (fic.Name != "PROMS")
|
||||
// Add the folder to the dictionary
|
||||
if (!myFolders.ContainsKey(tnc))
|
||||
{
|
||||
|
||||
|
||||
|
||||
// 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;
|
||||
myFolders.Add(tnc, fic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (loadedChildWorkingDraft)
|
||||
{
|
||||
loadedWorkingDraft = true;
|
||||
}
|
||||
|
||||
if (tn.Parent != null && !loadedWorkingDraft)
|
||||
{
|
||||
tn.Remove();
|
||||
}
|
||||
|
||||
return loadedWorkingDraft;
|
||||
}
|
||||
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
||||
{
|
||||
@ -1227,12 +1212,10 @@ namespace VEPROMS
|
||||
DiselectParentNodes(e.Node.Parent);
|
||||
DiselectChildNodes(e.Node.Nodes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
btnFixLinks.Enabled = AtLeastOneNodeChecked(); // C2017-030 support for Refresh Transitions/Update RO Values
|
||||
}
|
||||
|
||||
private void DiselectParentNodes(TreeNode parent)
|
||||
{
|
||||
while (parent != null)
|
||||
@ -1242,7 +1225,6 @@ namespace VEPROMS
|
||||
parent = parent.Parent;
|
||||
}
|
||||
}
|
||||
|
||||
private void DiselectChildNodes(TreeNodeCollection childes)
|
||||
{
|
||||
foreach (TreeNode oneChild in childes)
|
||||
@ -1252,8 +1234,6 @@ namespace VEPROMS
|
||||
DiselectChildNodes(oneChild.Nodes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void CheckChildNodes(TreeNode treeNode, bool ischecked)
|
||||
{
|
||||
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;
|
||||
|
||||
public ProgressBarItem ProgressBar
|
||||
@ -1379,7 +1433,6 @@ namespace VEPROMS
|
||||
private void sideNavItmDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
AdminToolType = E_AdminToolType.Delete;
|
||||
lblAdmToolProgressType.Text = "";
|
||||
setupProgessSteps1();
|
||||
|
||||
if (swDeleteFolder.Value)
|
||||
@ -1456,8 +1509,20 @@ namespace VEPROMS
|
||||
break;
|
||||
|
||||
case E_AdminToolType.Delete:
|
||||
if (swDeleteFolder.Value)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -1659,6 +1724,7 @@ namespace VEPROMS
|
||||
//C2024-005 Delete Annotations, Delete Folders
|
||||
private void swDeleteAnnotations_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
setupProgessSteps1();
|
||||
swDeleteFolder.Value = !swDeleteAnnotations.Value;
|
||||
if (swDeleteFolder.Value)
|
||||
ResetDelTV(true);
|
||||
@ -1668,6 +1734,7 @@ namespace VEPROMS
|
||||
|
||||
private void swDeleteFolder_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
setupProgessSteps1();
|
||||
swDeleteAnnotations.Value = !swDeleteFolder.Value;
|
||||
if (swDeleteFolder.Value)
|
||||
ResetDelTV(true);
|
||||
@ -1681,40 +1748,26 @@ namespace VEPROMS
|
||||
txtResults.Clear();
|
||||
txtProcess.Clear();
|
||||
|
||||
|
||||
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...");
|
||||
|
||||
//List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
||||
//foreach (TreeNode tn in myProcedures.Keys)
|
||||
// if (tn.Checked)
|
||||
// pil.Add(myProcedures[tn]);
|
||||
//Load Selected Folders with docversions
|
||||
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
|
||||
foreach (TreeNode tn in myDocVersions.Keys)
|
||||
if (tn.Checked)
|
||||
dvil.Add(myDocVersions[tn]);
|
||||
|
||||
////Load Selected Folders
|
||||
Dictionary<int, string> folderData = new Dictionary<int, string>();
|
||||
//Load Selected Folders with docversions
|
||||
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>();
|
||||
//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);
|
||||
ProcessDelete(dvil, ef);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1736,12 +1789,10 @@ namespace VEPROMS
|
||||
frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil);
|
||||
|
||||
frmAnnoDel.ShowDialog();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessDelete(List<DocVersionInfo> foldersToDelete)
|
||||
private void ProcessDelete(List<DocVersionInfo> foldersToDelete, List<FolderInfo> emptyFoldersToDelete)
|
||||
{
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
@ -1750,11 +1801,12 @@ namespace VEPROMS
|
||||
|
||||
foreach (var kvp in foldersToDelete)
|
||||
{
|
||||
int itemID = (int)kvp.ItemID;
|
||||
string folderName = kvp.Name;
|
||||
//Gather folder information
|
||||
FolderInfo fi = (FolderInfo)kvp.ActiveParent;
|
||||
int itemID = (int)fi.FolderID;
|
||||
string folderName = fi.Name;
|
||||
|
||||
// Perform the deletion operation
|
||||
// Assume DeleteFolderByID is a method that deletes the folder by its ItemID
|
||||
bool deletionSuccessful = DeleteFolderByID(itemID);
|
||||
|
||||
// Update txtProcess with the progress
|
||||
@ -1768,13 +1820,59 @@ namespace VEPROMS
|
||||
}
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
// Example deletion method
|
||||
private bool DeleteFolderByID(int itemID)
|
||||
|
||||
|
||||
//Delete non working info folders.
|
||||
foreach (var kvp in emptyFoldersToDelete)
|
||||
{
|
||||
// Implement your folder deletion logic here
|
||||
// Return true if deletion was successful, false otherwise
|
||||
return true; // Placeholder
|
||||
//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();
|
||||
}
|
||||
private bool DeleteFolderByID(int folderID)
|
||||
{
|
||||
try
|
||||
{
|
||||
//Delete
|
||||
Folder.DeleteFolderAdmin(folderID);
|
||||
|
||||
//update treeview UI via veProms
|
||||
_veProms.tv_FolderDelete(folderID);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public List<ProcedureInfo> RetrieveChkAnnotations()
|
||||
|
@ -149,13 +149,98 @@ 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="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.
|
||||
|
||||
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>
|
||||
<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">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
|
||||
@ -315,91 +400,6 @@ 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.
|
||||
|
||||
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>
|
||||
</data>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
@ -216,6 +216,8 @@ namespace VEPROMS
|
||||
set { _MyDocVersion = value; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// C2015-022 setup the child PROMS window
|
||||
public frmVEPROMS(frmVEPROMS myParent, DocVersionInfo myDocVersion)
|
||||
{
|
||||
@ -254,6 +256,22 @@ namespace VEPROMS
|
||||
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;
|
||||
|
||||
public frmVEPROMS()
|
||||
@ -475,6 +493,7 @@ namespace VEPROMS
|
||||
tv.OpenItem += new vlnTreeViewItemInfoEvent(tv_OpenItem);
|
||||
tv.TabDisplay += new StepPanelTabDisplayEvent(tc_PanelTabDisplay);
|
||||
tv.DeleteItemInfo += new vlnTreeViewItemInfoDeleteEvent(tv_DeleteItemInfo);
|
||||
tv.DeleteFolder += new vlnTreeViewItemInfoDeleteFolderEvent(Tv_DeleteFolder);
|
||||
tv.InsertItemInfo += new vlnTreeViewItemInfoInsertEvent(tv_InsertItemInfo);
|
||||
tv.NodeInsert += new vlnTreeViewEvent(tv_NodeInsert);
|
||||
tv.PasteItemInfo += new vlnTreeViewItemInfoPasteEvent(tv_PasteItemInfo);
|
||||
@ -1603,6 +1622,11 @@ namespace VEPROMS
|
||||
return rtval;
|
||||
}
|
||||
|
||||
private bool tv_DeleteFolder(object sender, vlnTreeItemInfoEventArgs args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool tv_PasteItemInfo(object sender, vlnTreeItemInfoPasteEventArgs args)
|
||||
{
|
||||
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)
|
||||
{
|
||||
frmBatchRefresh frm = new frmBatchRefresh(MySessionInfo);
|
||||
frmBatchRefresh frm = new frmBatchRefresh(MySessionInfo, this);
|
||||
frm.ProgressBar = bottomProgBar;
|
||||
frm.ShowDialog(this);
|
||||
}
|
||||
|
@ -1433,6 +1433,31 @@ namespace VEPROMS.CSLA.Library
|
||||
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
|
||||
#region Exists
|
||||
public static bool Exists(int folderID)
|
||||
@ -1536,6 +1561,8 @@ namespace VEPROMS.CSLA.Library
|
||||
// Needs to be overriden to add new validation rules
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
} // Class
|
||||
#region Converter
|
||||
|
@ -167,6 +167,8 @@ namespace VEPROMS.CSLA.Library
|
||||
tn.ResetNode("Dummy GetFolder");
|
||||
return tn;
|
||||
}
|
||||
|
||||
|
||||
// public abstract void LoadChildren();
|
||||
//private long _Start;
|
||||
//private Dictionary<string, long> _Timings=new Dictionary<string,long>();
|
||||
|
@ -26,6 +26,7 @@ namespace Volian.Controls.Library
|
||||
public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args);
|
||||
public delegate bool vlnTreeViewBoolEvent(object sender, vlnTreeEventArgs 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 vlnTreeViewItemInfoPasteEvent(object sender, vlnTreeItemInfoPasteEventArgs args);
|
||||
public delegate TreeNode vlnTreeViewTreeNodeEvent(object sender, vlnTreeEventArgs args);
|
||||
@ -220,6 +221,15 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public class vlnTreeFolderDeleteEventArgs : EventArgs
|
||||
{
|
||||
public int FolderId { get; }
|
||||
|
||||
public vlnTreeFolderDeleteEventArgs(int folderId)
|
||||
{
|
||||
FolderId = folderId;
|
||||
}
|
||||
}
|
||||
public enum E_InsertType {Before, After, Child};
|
||||
public partial class vlnTreeItemInfoInsertEventArgs
|
||||
{
|
||||
@ -427,6 +437,12 @@ namespace Volian.Controls.Library
|
||||
if (DeleteItemInfo != null) return DeleteItemInfo(sender, args);
|
||||
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;
|
||||
private bool OnInsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args)
|
||||
{
|
||||
@ -3567,6 +3583,41 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
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)
|
||||
{
|
||||
DateTime dtStart = DateTime.Now;
|
||||
|
Loading…
x
Reference in New Issue
Block a user