Compare commits
10 Commits
C2024-005
...
112edd1c8a
| Author | SHA1 | Date | |
|---|---|---|---|
| 112edd1c8a | |||
| 819c1bbec4 | |||
| 6b6968561b | |||
| 24fbb69e25 | |||
| 79751732a3 | |||
| e6e62ed2c8 | |||
| 8f2cbf4081 | |||
|
|
c25f501909 | ||
|
|
bf72a6bf78 | ||
|
|
a1380dbb8a |
@@ -23519,90 +23519,6 @@ 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 |
|
||||||
@@ -23636,8 +23552,8 @@ BEGIN TRY -- Try Block
|
|||||||
DECLARE @RevDate varchar(255)
|
DECLARE @RevDate varchar(255)
|
||||||
DECLARE @RevDescription varchar(255)
|
DECLARE @RevDescription varchar(255)
|
||||||
|
|
||||||
set @RevDate = '07/29/2024 11:24'
|
set @RevDate = '07/18/2024 11:24'
|
||||||
set @RevDescription = 'C2021-059 Add SQL for Admin tool delete folders.'
|
set @RevDescription = 'C2024-005 Add an Admin tool that can delete a group of annotations.'
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -97,8 +97,6 @@
|
|||||||
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.sideNavPanel5 = new DevComponents.DotNetBar.Controls.SideNavPanel();
|
|
||||||
this.btn_ShowUsers = 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();
|
||||||
@@ -131,15 +129,11 @@
|
|||||||
this.sideNavPanel3.SuspendLayout();
|
this.sideNavPanel3.SuspendLayout();
|
||||||
this.sideNavPanel1.SuspendLayout();
|
this.sideNavPanel1.SuspendLayout();
|
||||||
this.sideNavPanel2.SuspendLayout();
|
this.sideNavPanel2.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)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.myTV.CheckBoxes = true;
|
this.myTV.CheckBoxes = true;
|
||||||
this.myTV.Dock = System.Windows.Forms.DockStyle.Bottom;
|
this.myTV.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
this.myTV.Location = new System.Drawing.Point(0, 184);
|
this.myTV.Location = new System.Drawing.Point(0, 184);
|
||||||
@@ -472,7 +466,6 @@
|
|||||||
this.sideNav1.Controls.Add(this.sideNavPanel3);
|
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.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;
|
||||||
@@ -506,31 +499,6 @@
|
|||||||
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
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -591,15 +559,12 @@
|
|||||||
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("Process Deletions", "", resources.GetString("labelX14.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
|
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.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)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.myTVdel.CheckBoxes = true;
|
this.myTVdel.CheckBoxes = true;
|
||||||
this.myTVdel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
this.myTVdel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
this.myTVdel.Location = new System.Drawing.Point(0, 127);
|
this.myTVdel.Location = new System.Drawing.Point(0, 127);
|
||||||
@@ -1250,7 +1215,8 @@
|
|||||||
// sideNavItmUsers
|
// sideNavItmUsers
|
||||||
//
|
//
|
||||||
this.sideNavItmUsers.Name = "sideNavItmUsers";
|
this.sideNavItmUsers.Name = "sideNavItmUsers";
|
||||||
this.sideNavItmUsers.Panel = this.sideNavPanel5;
|
this.sideNavItmUsers.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
||||||
|
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);
|
||||||
@@ -1399,7 +1365,6 @@
|
|||||||
this.sideNavPanel3.ResumeLayout(false);
|
this.sideNavPanel3.ResumeLayout(false);
|
||||||
this.sideNavPanel1.ResumeLayout(false);
|
this.sideNavPanel1.ResumeLayout(false);
|
||||||
this.sideNavPanel2.ResumeLayout(false);
|
this.sideNavPanel2.ResumeLayout(false);
|
||||||
this.sideNavPanel5.ResumeLayout(false);
|
|
||||||
this.panelEx4.ResumeLayout(false);
|
this.panelEx4.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
@@ -1449,8 +1414,6 @@
|
|||||||
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;
|
||||||
@@ -1496,3 +1459,5 @@
|
|||||||
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmDelete;
|
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmDelete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,23 +24,19 @@ 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;
|
|
||||||
|
// When opening Admin tools Check tab will be default.
|
||||||
|
this.sideNavItmCheck.Checked = true;
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
@@ -98,7 +94,6 @@ 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.
|
||||||
@@ -141,8 +136,6 @@ 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;
|
||||||
@@ -165,6 +158,12 @@ namespace VEPROMS
|
|||||||
FolderInfo fi = FolderInfo.GetTop();
|
FolderInfo fi = FolderInfo.GetTop();
|
||||||
|
|
||||||
if (fi.ChildFolderCount > 0)
|
if (fi.ChildFolderCount > 0)
|
||||||
|
{
|
||||||
|
if (noProcs)
|
||||||
|
{
|
||||||
|
LoadBottomLevelFolders(fi, myTVdel);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
TreeNode tn = new TreeNode(fi.Name);
|
TreeNode tn = new TreeNode(fi.Name);
|
||||||
tn.Tag = fi;
|
tn.Tag = fi;
|
||||||
@@ -172,69 +171,88 @@ namespace VEPROMS
|
|||||||
LoadChildFolders(fi, tn, noProcs);
|
LoadChildFolders(fi, tn, noProcs);
|
||||||
myTVdel.Nodes.Add(tn);
|
myTVdel.Nodes.Add(tn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (myTVdel.SelectedNode != null)
|
if (myTVdel.SelectedNode != null)
|
||||||
myTVdel.SelectedNode.Expand();
|
myTVdel.SelectedNode.Expand();
|
||||||
|
|
||||||
//Expand if folders
|
|
||||||
if (noProcs)
|
|
||||||
myTVdel.ExpandAll();
|
|
||||||
|
|
||||||
this.Cursor = Cursors.Default;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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;
|
bool loadedChildWorkingDraft = false; // B2021-060 flag when child folder working draft is loaded
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
if (loadedChildWorkingDraft) loadedWorkingDraft = true; // B2021-060 if child folder working draft loaded set loadedWorkingDraft
|
||||||
{
|
|
||||||
// Add the folder to the dictionary
|
|
||||||
if (!myFolders.ContainsKey(tnc))
|
|
||||||
{
|
|
||||||
myFolders.Add(tnc, fic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (loadedChildWorkingDraft)
|
|
||||||
{
|
|
||||||
loadedWorkingDraft = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tn.Parent != null && !loadedWorkingDraft)
|
if (tn.Parent != null && !loadedWorkingDraft)
|
||||||
{
|
|
||||||
tn.Remove();
|
tn.Remove();
|
||||||
}
|
|
||||||
|
|
||||||
return loadedWorkingDraft;
|
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")
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
||||||
{
|
{
|
||||||
bool rtnval = false;
|
bool rtnval = false;
|
||||||
@@ -1212,10 +1230,12 @@ 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)
|
||||||
@@ -1225,6 +1245,7 @@ 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)
|
||||||
@@ -1234,6 +1255,8 @@ 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)
|
||||||
@@ -1247,80 +1270,6 @@ 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
|
||||||
@@ -1433,6 +1382,7 @@ namespace VEPROMS
|
|||||||
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)
|
||||||
@@ -1509,20 +1459,8 @@ namespace VEPROMS
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case E_AdminToolType.Delete:
|
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;
|
splitContainer3.Panel2Collapsed = true;
|
||||||
progressSteps1.Visible = false;
|
progressSteps1.Visible = false;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1724,7 +1662,6 @@ 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);
|
||||||
@@ -1734,7 +1671,6 @@ namespace VEPROMS
|
|||||||
|
|
||||||
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);
|
||||||
@@ -1748,26 +1684,40 @@ namespace VEPROMS
|
|||||||
txtResults.Clear();
|
txtResults.Clear();
|
||||||
txtProcess.Clear();
|
txtProcess.Clear();
|
||||||
|
|
||||||
|
|
||||||
if (swDeleteFolder.Value)
|
if (swDeleteFolder.Value)
|
||||||
{
|
{
|
||||||
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)
|
//TODO process deletions of folders
|
||||||
{
|
|
||||||
txtProcess.AppendText("Deleting Folders...");
|
txtProcess.AppendText("Deleting Folders...");
|
||||||
|
|
||||||
//Load Selected Folders with docversions
|
//List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
||||||
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
|
//foreach (TreeNode tn in myProcedures.Keys)
|
||||||
foreach (TreeNode tn in myDocVersions.Keys)
|
// if (tn.Checked)
|
||||||
if (tn.Checked)
|
// pil.Add(myProcedures[tn]);
|
||||||
dvil.Add(myDocVersions[tn]);
|
|
||||||
|
|
||||||
//Load Selected Folders with docversions
|
////Load Selected Folders
|
||||||
List<FolderInfo> ef = new List<FolderInfo>();
|
Dictionary<int, string> folderData = new Dictionary<int, string>();
|
||||||
foreach (TreeNode tn in myFolders.Keys)
|
|
||||||
if (tn.Checked)
|
|
||||||
ef.Add(myFolders[tn]);
|
|
||||||
|
|
||||||
ProcessDelete(dvil, ef);
|
//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);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1789,10 +1739,12 @@ 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, List<FolderInfo> emptyFoldersToDelete)
|
private void ProcessDelete(List<DocVersionInfo> foldersToDelete)
|
||||||
{
|
{
|
||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
@@ -1801,12 +1753,11 @@ namespace VEPROMS
|
|||||||
|
|
||||||
foreach (var kvp in foldersToDelete)
|
foreach (var kvp in foldersToDelete)
|
||||||
{
|
{
|
||||||
//Gather folder information
|
int itemID = (int)kvp.ItemID;
|
||||||
FolderInfo fi = (FolderInfo)kvp.ActiveParent;
|
string folderName = kvp.Name;
|
||||||
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
|
||||||
@@ -1820,59 +1771,13 @@ 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
|
// Example deletion method
|
||||||
|
private bool DeleteFolderByID(int itemID)
|
||||||
{
|
{
|
||||||
txtProcess.AppendText($"Failed to delete folder: {folderName} (ID: {itemID})");
|
// Implement your folder deletion logic here
|
||||||
}
|
// Return true if deletion was successful, false otherwise
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
return true; // Placeholder
|
||||||
}
|
|
||||||
|
|
||||||
//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()
|
public List<ProcedureInfo> RetrieveChkAnnotations()
|
||||||
|
|||||||
@@ -149,11 +149,11 @@ 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.
|
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
|
||||||
|
|
||||||
Click on the on/off switches to turn on/off each tool.
|
Be sure a current backup of the database exists prior to running this function.
|
||||||
|
|
||||||
Note that only one of these tools can be run at a time.</value>
|
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
|
<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.
|
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
||||||
@@ -192,7 +192,7 @@ It is recommended that this be done during off hours.
|
|||||||
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
||||||
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
||||||
zJwL4b/EAAAAAElFTkSuQmCC
|
zJwL4b/EAAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swUpdateROVals.SuperTooltip" xml:space="preserve">
|
<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.
|
<value>This allows the user to update referenced objects values for multiple working drafts in a batch mode.
|
||||||
@@ -239,7 +239,7 @@ If more than one procedure is selected, it is recommended that this be performed
|
|||||||
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
||||||
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
||||||
zJwL4b/EAAAAAElFTkSuQmCC
|
zJwL4b/EAAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</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>
|
||||||
@@ -256,7 +256,7 @@ If more than one procedure is selected, it is recommended that this be performed
|
|||||||
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).
|
||||||
@@ -333,7 +333,7 @@ This function will remove all of the saved attachment PDFS stored in the databas
|
|||||||
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>
|
||||||
@@ -350,7 +350,7 @@ This function will remove all of the saved attachment PDFS stored in the databas
|
|||||||
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).
|
||||||
|
|||||||
@@ -216,8 +216,6 @@ 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)
|
||||||
{
|
{
|
||||||
@@ -256,22 +254,6 @@ 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()
|
||||||
@@ -493,7 +475,6 @@ 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);
|
||||||
@@ -1622,11 +1603,6 @@ 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);
|
||||||
@@ -2765,7 +2741,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
void btnAdministrativeTools_Click(object sender, EventArgs e)
|
void btnAdministrativeTools_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
frmBatchRefresh frm = new frmBatchRefresh(MySessionInfo, this);
|
frmBatchRefresh frm = new frmBatchRefresh(MySessionInfo);
|
||||||
frm.ProgressBar = bottomProgBar;
|
frm.ProgressBar = bottomProgBar;
|
||||||
frm.ShowDialog(this);
|
frm.ShowDialog(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2547,6 +2547,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
newItemInfo.UpdateTransitionText();
|
newItemInfo.UpdateTransitionText();
|
||||||
newItemInfo.UpdateROText();
|
newItemInfo.UpdateROText();
|
||||||
newItemInfo.UpdatePastedStepTransitionText();
|
newItemInfo.UpdatePastedStepTransitionText();
|
||||||
|
|
||||||
// Add to tree
|
// Add to tree
|
||||||
if (newItemInfo.NextItem != null)
|
if (newItemInfo.NextItem != null)
|
||||||
{
|
{
|
||||||
@@ -2564,14 +2565,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Create tree node for copied procedure when no other procedures exist in the folder
|
//Create tree node for copied procedure when no other procedures exist in the working draft (treeNodeReplace)
|
||||||
VETreeNode vtn = treeNodeReplace as VETreeNode;
|
VETreeNode tn = null;
|
||||||
DocVersionInfo dvi = vtn.VEObject as DocVersionInfo;
|
tn = new VETreeNode(newItemInfo);
|
||||||
|
treeNodeReplace.Nodes.Add(tn);
|
||||||
ItemInfo newProc = dvi.PasteChild(copyStartID);
|
|
||||||
VETreeNode tn1 = new VETreeNode(newProc);
|
|
||||||
treeNodeReplace.Nodes.Add(tn1); // add tree node to end of list.
|
|
||||||
treeNodeReplace = tn1;
|
|
||||||
}
|
}
|
||||||
return newItemInfo;
|
return newItemInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1433,31 +1433,6 @@ 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)
|
||||||
@@ -1561,8 +1536,6 @@ 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
|
||||||
|
|||||||
@@ -167,9 +167,7 @@ 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()
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ namespace Volian.Controls.Library
|
|||||||
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);
|
||||||
@@ -221,15 +220,6 @@ 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
|
||||||
{
|
{
|
||||||
@@ -437,12 +427,6 @@ 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)
|
||||||
{
|
{
|
||||||
@@ -713,7 +697,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
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));
|
||||||
@@ -1068,7 +1052,7 @@ 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));
|
||||||
@@ -1160,7 +1144,7 @@ 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)));
|
||||||
@@ -1272,7 +1256,7 @@ 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")
|
||||||
@@ -1283,7 +1267,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1441,7 +1425,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;
|
||||||
@@ -1489,12 +1473,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)
|
||||||
{
|
{
|
||||||
@@ -1841,7 +1825,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));
|
||||||
@@ -1853,10 +1837,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"))
|
||||||
@@ -2123,11 +2107,11 @@ 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
|
||||||
@@ -2260,7 +2244,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; }
|
||||||
@@ -2438,7 +2422,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:
|
||||||
@@ -2559,8 +2543,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);
|
||||||
@@ -2610,7 +2594,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);
|
||||||
@@ -2622,7 +2606,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);
|
||||||
@@ -2756,7 +2740,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
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");
|
||||||
@@ -2786,7 +2770,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));
|
||||||
@@ -2882,7 +2866,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)
|
||||||
{
|
{
|
||||||
@@ -2894,7 +2878,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;
|
||||||
@@ -2918,7 +2902,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
|
||||||
@@ -2962,8 +2946,8 @@ 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);
|
||||||
@@ -3245,7 +3229,7 @@ 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;
|
||||||
@@ -3528,7 +3512,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))
|
||||||
{
|
{
|
||||||
@@ -3583,41 +3567,6 @@ 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user