Compare commits

...

14 Commits

Author SHA1 Message Date
99965c30f4 B2024-068-VCS-Deviation-Format 2024-08-07 16:53:56 -04:00
7a768484a1 Merge pull request 'B2024-057' (#382) from B2024-057 into Development
approved, ready for testing
2024-08-06 11:18:30 -04:00
Kevin Laskey
5f7af3309d B2024-054 - Update Annotation tooltip 2024-08-06 11:17:17 -04:00
Kevin Laskey
1f3a1dabbc B2024-055 - Update tooltips for the labels on delete annotations and delete folders 2024-08-06 10:58:04 -04:00
Kevin Laskey
4b61495960 B2024-057 - updated curors 2024-08-06 10:48:05 -04:00
Kevin Laskey
d091a37171 B2024-055 - Update tooltips on admin delete functions 2024-08-06 10:29:06 -04:00
Kevin Laskey
189b78d7d3 B2024-057 - Added check to see if anything is checked out for annotations and folder delete from admin area. 2024-08-06 09:14:36 -04:00
8ee7a31b97 Merge pull request 'C2024-018 - Update to use results pane' (#381) from C2024-018 into Development
approved and ready for testing phase
2024-08-05 15:29:46 -04:00
Kevin Laskey
055be66421 C2024-018 - Update to use results pane 2024-08-05 15:24:43 -04:00
86a3e56a27 Merge pull request 'C2024-018 - Updated fixes per Michelle testing. Added some confirmation messages' (#380) from C2024-018 into Development
changes approved. - ready for testing phase
2024-08-05 12:12:05 -04:00
Kevin Laskey
0db98e4182 C2024-018 - Updated fixes per Michelle testing. Added some confirmation messages 2024-08-05 11:12:21 -04:00
3102596a3d Merge pull request 'C2021-059_deleteFolders' (#379) from C2021-059_deleteFolders into Development
code changes look good.  - on to testing phase
2024-08-02 14:05:24 -04:00
Kevin Laskey
41aa195785 C2021-059 - Added extra code to ensure delect sets parent tree items deslected 2024-08-02 13:08:19 -04:00
Kevin Laskey
954186265e C2021-059 - Patch in auto checkbox filling for delete tree. 2024-08-02 12:56:12 -04:00
4 changed files with 95 additions and 38 deletions

Binary file not shown.

View File

@@ -513,7 +513,7 @@
this.swDeleteFolder.Name = "swDeleteFolder"; this.swDeleteFolder.Name = "swDeleteFolder";
this.swDeleteFolder.Size = new System.Drawing.Size(69, 22); this.swDeleteFolder.Size = new System.Drawing.Size(69, 22);
this.swDeleteFolder.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.swDeleteFolder.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swDeleteFolder, new DevComponents.DotNetBar.SuperTooltipInfo("Check RO Links", "", resources.GetString("swDeleteFolder.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150))); this.superTooltip1.SetSuperTooltip(this.swDeleteFolder, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Folders", "", resources.GetString("swDeleteFolder.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 150)));
this.swDeleteFolder.SwitchClickTogglesValue = true; this.swDeleteFolder.SwitchClickTogglesValue = true;
this.swDeleteFolder.TabIndex = 39; this.swDeleteFolder.TabIndex = 39;
this.swDeleteFolder.ValueChanged += new System.EventHandler(this.swDeleteFolder_ValueChanged); this.swDeleteFolder.ValueChanged += new System.EventHandler(this.swDeleteFolder_ValueChanged);
@@ -529,7 +529,7 @@
this.labelX13.Location = new System.Drawing.Point(85, 42); this.labelX13.Location = new System.Drawing.Point(85, 42);
this.labelX13.Name = "labelX13"; this.labelX13.Name = "labelX13";
this.labelX13.Size = new System.Drawing.Size(168, 22); this.labelX13.Size = new System.Drawing.Size(168, 22);
this.superTooltip1.SetSuperTooltip(this.labelX13, new DevComponents.DotNetBar.SuperTooltipInfo("Check RO Links", "", resources.GetString("labelX13.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(350, 175))); this.superTooltip1.SetSuperTooltip(this.labelX13, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Folders", "", resources.GetString("labelX13.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(350, 175)));
this.labelX13.TabIndex = 38; this.labelX13.TabIndex = 38;
this.labelX13.Text = "Delete Folders"; this.labelX13.Text = "Delete Folders";
// //
@@ -543,7 +543,7 @@
this.swDeleteAnnotations.Name = "swDeleteAnnotations"; this.swDeleteAnnotations.Name = "swDeleteAnnotations";
this.swDeleteAnnotations.Size = new System.Drawing.Size(69, 22); this.swDeleteAnnotations.Size = new System.Drawing.Size(69, 22);
this.swDeleteAnnotations.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.swDeleteAnnotations.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swDeleteAnnotations, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Transitions", "", resources.GetString("swDeleteAnnotations.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(265, 175))); this.superTooltip1.SetSuperTooltip(this.swDeleteAnnotations, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Annotations", "", resources.GetString("swDeleteAnnotations.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(265, 175)));
this.swDeleteAnnotations.SwitchClickTogglesValue = true; this.swDeleteAnnotations.SwitchClickTogglesValue = true;
this.swDeleteAnnotations.TabIndex = 37; this.swDeleteAnnotations.TabIndex = 37;
this.swDeleteAnnotations.Value = true; this.swDeleteAnnotations.Value = true;
@@ -561,7 +561,7 @@
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("Delete Annotations", "", resources.GetString("labelX14.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
this.labelX14.TabIndex = 36; this.labelX14.TabIndex = 36;
this.labelX14.Text = "Delete Annotations"; this.labelX14.Text = "Delete Annotations";
// //
@@ -573,6 +573,7 @@
this.myTVdel.Name = "myTVdel"; this.myTVdel.Name = "myTVdel";
this.myTVdel.Size = new System.Drawing.Size(300, 367); this.myTVdel.Size = new System.Drawing.Size(300, 367);
this.myTVdel.TabIndex = 34; this.myTVdel.TabIndex = 34;
this.myTVdel.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck_DelAnn);
// //
// btnDeleteItems // btnDeleteItems
// //

View File

@@ -1520,7 +1520,7 @@ namespace VEPROMS
{ {
splitContainer3.Panel2Collapsed = false; splitContainer3.Panel2Collapsed = false;
progressSteps1.Items.Add(siOrphDatRecs); progressSteps1.Items.Add(siOrphDatRecs);
lblAdmToolProgressType.Text = "Repairing: "; lblAdmToolProgressType.Text = "Deleting: ";
progressSteps1.Visible = true; progressSteps1.Visible = true;
progressSteps1.Refresh(); progressSteps1.Refresh();
} }
@@ -1755,19 +1755,78 @@ namespace VEPROMS
txtResults.Clear(); txtResults.Clear();
txtProcess.Clear(); txtProcess.Clear();
if (swDeleteFolder.Value) this.Cursor = Cursors.WaitCursor;
{
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...");
//Load Selected Folders with docversions //Create checked proce and doc info lists.
List<ProcedureInfo> pil = new List<ProcedureInfo>();
List<DocVersionInfo> dvil = new List<DocVersionInfo>(); List<DocVersionInfo> dvil = new List<DocVersionInfo>();
// Create a list of procedures the user selected
foreach (TreeNode tn in myProcedures.Keys)
if (tn.Checked)
pil.Add(myProcedures[tn]);
// Create a list of doc versions the user selected
foreach (TreeNode tn in myDocVersions.Keys) foreach (TreeNode tn in myDocVersions.Keys)
if (tn.Checked) if (tn.Checked)
dvil.Add(myDocVersions[tn]); dvil.Add(myDocVersions[tn]);
//Load Selected Folders with docversions bool cancelledOut = false; // Flag to indicate if the process should be cancelled
StringBuilder sbDocVersions = new StringBuilder();
foreach (DocVersionInfo dq in dvil)
{
string msg = string.Empty;
if (!MySessionInfo.CanCheckOutItem(dq.VersionID, CheckOutType.DocVersion, ref msg))
{
string msgp = string.Empty;
foreach (ProcedureInfo pi in dq.Procedures)
{
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref msgp))
{
FolderInfo fi = (FolderInfo)dq.ActiveParent;
int itemID = (int)fi.FolderID;
string folderName = fi.Name;
if (swDeleteFolder.Value)
sbDocVersions.AppendLine($"{folderName} - {msgp}");
else
sbDocVersions.AppendLine(msgp);
cancelledOut = true;
}
}
}
}
if (cancelledOut)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("The batch update process was not successful for all working drafts selected.");
sb.AppendLine("The following procedures are currently checked out...");
sb.AppendLine();
sb.AppendLine(sbDocVersions.ToString());
sb.AppendLine();
if (swDeleteFolder.Value)
sb.AppendLine("If you want to delete these folders, please contact the respective users and have them close any procedures in the working draft.");
else
sb.AppendLine("If you want to delete annotations from these working drafts, please contact the respective users and have them close any procedures in the working draft.");
sb.AppendLine();
txtProcess.AppendText(sb.ToString());
this.Cursor = Cursors.Default;
return;
}
if (swDeleteFolder.Value)
{
if (FlexibleMessageBox.Show(this, "Are 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...");
//Load Selected Folders
List<FolderInfo> ef = new List<FolderInfo>(); List<FolderInfo> ef = new List<FolderInfo>();
foreach (TreeNode tn in myFolders.Keys) foreach (TreeNode tn in myFolders.Keys)
@@ -1782,28 +1841,19 @@ namespace VEPROMS
// Write progress status // Write progress status
txtProcess.AppendText("Deleting Annotations..."); txtProcess.AppendText("Deleting Annotations...");
// Create a list of procedures the user selected
List<ProcedureInfo> pil = new List<ProcedureInfo>();
foreach (TreeNode tn in myProcedures.Keys)
if (tn.Checked)
pil.Add(myProcedures[tn]);
// Create a list of doc versions the user selected
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
foreach (TreeNode tn in myDocVersions.Keys)
if (tn.Checked)
dvil.Add(myDocVersions[tn]);
frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil); frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil);
frmAnnoDel.ShowDialog(); frmAnnoDel.ShowDialog();
} }
this.Cursor = Cursors.Default;
} }
private void ProcessDelete(List<DocVersionInfo> foldersToDelete, List<FolderInfo> emptyFoldersToDelete) private void ProcessDelete(List<DocVersionInfo> foldersToDelete, List<FolderInfo> emptyFoldersToDelete)
{ {
int foldersDeleted = 0;
DateTime pStart = DateTime.Now; DateTime pStart = DateTime.Now;
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(pStart.ToString("MM/dd/yyyy @ HH:mm")); txtProcess.AppendText(pStart.ToString("MM/dd/yyyy @ HH:mm"));
@@ -1823,6 +1873,7 @@ namespace VEPROMS
if (deletionSuccessful) if (deletionSuccessful)
{ {
txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})"); txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})");
foldersDeleted += 1;
} }
else else
{ {
@@ -1847,14 +1898,19 @@ namespace VEPROMS
if (deletionSuccessful) if (deletionSuccessful)
{ {
txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})"); txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})");
foldersDeleted += 1;
} }
else else
{ {
txtProcess.AppendText($"Failed to delete folder: {folderName} (ID: {itemID})"); txtProcess.AppendText($"Failed to delete folder: {folderName} (ID: {itemID})");
} }
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
} }
//Run Repair //Run Repair
int prgStpIdx = -1; int prgStpIdx = -1;
StepProgress(++prgStpIdx, 50); StepProgress(++prgStpIdx, 50);
@@ -1864,8 +1920,11 @@ namespace VEPROMS
//rebuild //rebuild
ResetDelTV(true); ResetDelTV(true);
MessageBox.Show("Folder Deletion Completed", "Delete Folders"); MessageBox.Show($"Folder deletion completed, {foldersDeleted} folders have been deleted.", "Delete Folders");
ClearStepProgress(); ClearStepProgress();
txtResults.AppendText($"Folder deletion process completed, {foldersDeleted} folders have been deleted.");
txtResults.AppendText(Environment.NewLine);
} }
private bool DeleteFolderByID(int folderID) private bool DeleteFolderByID(int folderID)

View File

@@ -121,9 +121,7 @@
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve"> <data name="swDeleteFolder.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 remove folders and sub folders as well as their contents.
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. Be sure a current backup of the database exists prior performing this function.
@@ -132,28 +130,27 @@ It is recommended that this be done during off hours.
</value> </value>
</data> </data>
<data name="labelX13.SuperTooltip" xml:space="preserve"> <data name="labelX13.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 remove folders and sub folders as well as their contents.
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. Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours. It is recommended that this be done during off hours.
</value> </value>
</data> </data>
<data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve"> <data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve">
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set. <value>This function will allow the user to remove annotations from the selected working drafts.
Be sure a current backup of the database exists prior to running this function. Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value> If more than one working draft 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 allow the user to remove annotations from the selected working drafts.
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 working draft is selected, it is recommended that this be performed during off hours.</value>
</data> </data>
<data name="btnDeleteItems.SuperTooltip" xml:space="preserve"> <data name="btnDeleteItems.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 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.