C2026-002 Admin Tool - Data Check - Enhancements to new admin Tool for ROs not used.
Add the ability to filter out groups of Alarms from the results.
This commit is contained in:
@@ -149,7 +149,28 @@ namespace VEPROMS
|
||||
return false;
|
||||
}
|
||||
|
||||
private void ResetTV(bool noProcs)
|
||||
//C2026-002 Enhancements to new admin Tool for ROs not used.
|
||||
private void ResetmyTV_RO_DBs()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
myTV_RO_DBs.Nodes.Clear();
|
||||
|
||||
TreeNode tn = myTV_RO_DBs.Nodes.Add("Select All");
|
||||
tn.Tag = 0;
|
||||
tn.Checked = true;
|
||||
|
||||
foreach (DataRow rw in GeneralReports.GetRODBs().Rows)
|
||||
{
|
||||
TreeNode tn_db = tn.Nodes.Add(rw["dbiTitle"].ToString());
|
||||
tn_db.Tag = rw["dbiID"].ToString();
|
||||
tn_db.Checked = true;
|
||||
}
|
||||
tn.Expand();
|
||||
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
private void ResetTV(bool noProcs)
|
||||
{
|
||||
btnFixLinks.Enabled = false;
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
@@ -1071,6 +1092,24 @@ namespace VEPROMS
|
||||
}
|
||||
|
||||
private void myTV_AfterCheck(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
//B2025 - 013 Admin Tool Tree Behavior
|
||||
//only want to perform this if
|
||||
// not an unknown action
|
||||
// aka is a mouse click
|
||||
// if this is fire-ing because clicked a parent or a child of an item
|
||||
// want this to only fire once - for the item clicked - not for parents/children
|
||||
if (e.Action != TreeViewAction.Unknown)
|
||||
{
|
||||
TreeView_AfterCheck(sender, e);
|
||||
|
||||
btnFixLinks.Enabled = btnDeleteItems.Enabled = AtLeastOneNodeChecked(((TreeView)sender).Nodes); // C2017-030 support for Refresh Transitions/Update RO Values
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//C2026-002 Enhancements to new admin Tool for ROs not used.
|
||||
private void TreeView_AfterCheck(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
//B2025 - 013 Admin Tool Tree Behavior
|
||||
//only want to perform this if
|
||||
@@ -1092,12 +1131,9 @@ namespace VEPROMS
|
||||
DiselectParentNodes(e.Node.Parent);
|
||||
DiselectChildNodes(e.Node.Nodes);
|
||||
}
|
||||
|
||||
btnFixLinks.Enabled = btnDeleteItems.Enabled = AtLeastOneNodeChecked(((TreeView)sender).Nodes); // C2017-030 support for Refresh Transitions/Update RO Values
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void DiselectParentNodes(TreeNode parent)
|
||||
{
|
||||
while (parent != null)
|
||||
@@ -1244,6 +1280,7 @@ namespace VEPROMS
|
||||
{
|
||||
AdminToolType = E_AdminToolType.Maintenance;
|
||||
setupProgessSteps1();
|
||||
ResetmyTV_RO_DBs(); //C2026-002 Enhancements to new admin Tool for ROs not used.
|
||||
|
||||
//notify Set Admin user that only Full Admins can run maintenance tools
|
||||
if (!IsAdministratorUser)
|
||||
@@ -1798,8 +1835,21 @@ namespace VEPROMS
|
||||
txtResults.AppendText(statmsg);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
|
||||
//Generate the data for ROs Not Used and save it to a TreeView
|
||||
TreeView tv = TreeViewExtensions.GetROTree(GeneralReports.GetROsNotUsedInPROMS(), true);
|
||||
//C2026-002 Enhancements to new admin Tool for ROs not used.
|
||||
//Get the selected nodes
|
||||
DataTable dtIDs = new DataTable();
|
||||
dtIDs.Columns.Add("ID");
|
||||
|
||||
foreach (TreeNode tn in myTV_RO_DBs.Nodes[0].Nodes)
|
||||
if (tn.Checked)
|
||||
{
|
||||
DataRow dtrw = dtIDs.NewRow();
|
||||
dtrw["ID"] = int.Parse(tn.Tag.ToString());
|
||||
dtIDs.Rows.Add(dtrw);
|
||||
}
|
||||
|
||||
//Generate the data for ROs Not Used and save it to a TreeView
|
||||
TreeView tv = TreeViewExtensions.GetROTree(GeneralReports.GetROsNotUsedInPROMS(dtIDs), true);
|
||||
//Output the TreeView as an Image
|
||||
if (tv.Nodes.Count != 0)
|
||||
tv.SaveTreeViewAsImage(sfd.FileName);
|
||||
|
||||
Reference in New Issue
Block a user