C2025-051 Add a "General Tools" option to the V->Proms Menu.
This commit is contained in:
@@ -34,8 +34,8 @@ namespace VEPROMS
|
||||
_veProms = veProms;
|
||||
|
||||
|
||||
// When opening Admin tools Check tab will be default.
|
||||
this.sideNavItmCheck.Checked = true;
|
||||
// When opening Admin tools Repair tab will be default.
|
||||
this.sideNavItmRepair.Checked = true;
|
||||
|
||||
if (sideNavItmDelete.Checked)
|
||||
{
|
||||
@@ -95,7 +95,6 @@ namespace VEPROMS
|
||||
int affectedRows = ESP_FixHyphens.Execute("vesp_FixHyphens") / 2;// Two results for each change
|
||||
txtProcess.AppendText(string.Format("Fixed {0} Hyphens", affectedRows));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
//txtProcess.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(string.Format("{0} Hyphens were Fixed.", affectedRows));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
@@ -143,16 +142,10 @@ namespace VEPROMS
|
||||
return false;
|
||||
}
|
||||
|
||||
private List<string> myTreeNodePath;
|
||||
private void ResetTV()
|
||||
{
|
||||
ResetTV(false);
|
||||
}
|
||||
private void ResetTV(bool noProcs)
|
||||
private void ResetTV(bool noProcs)
|
||||
{
|
||||
btnFixLinks.Enabled = false;
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
//myTreeNodePath = new List<string>();
|
||||
myTV.Nodes.Clear();
|
||||
myDocVersions.Clear();
|
||||
myFolders.Clear();
|
||||
@@ -165,10 +158,6 @@ namespace VEPROMS
|
||||
myTV.SelectedNode.Expand();
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
private void ResetDelTV()
|
||||
{
|
||||
ResetDelTV(false);
|
||||
}
|
||||
private void ResetDelTV(bool noProcs)
|
||||
{
|
||||
btnFixLinks.Enabled = false;
|
||||
@@ -208,13 +197,10 @@ namespace VEPROMS
|
||||
TreeNode tnc = tn.Nodes.Add(fic.Name);
|
||||
tnc.Tag = fic;
|
||||
|
||||
if (fic.ChildFolderCount > 0)
|
||||
{
|
||||
if (LoadChildFolders(fic, tnc, noProcs))
|
||||
loadedChildWorkingDraft = true;
|
||||
}
|
||||
if (fic.ChildFolderCount > 0 && LoadChildFolders(fic, tnc, noProcs))
|
||||
loadedChildWorkingDraft = true;
|
||||
|
||||
if (fic.FolderDocVersionCount > 0)
|
||||
if (fic.FolderDocVersionCount > 0)
|
||||
{
|
||||
if (!LoadDocVersions(fic, tnc, noProcs))
|
||||
tnc.Remove();
|
||||
@@ -252,12 +238,9 @@ namespace VEPROMS
|
||||
{
|
||||
tnc.Tag = dvi;
|
||||
myDocVersions.Add(tnc, dvi);
|
||||
if (!noProcs)
|
||||
{
|
||||
if (dvi.Procedures.Count > 0)
|
||||
LoadProcedures(dvi, tnc);
|
||||
}
|
||||
rtnval = true;
|
||||
if (!noProcs && dvi.Procedures.Count > 0)
|
||||
LoadProcedures(dvi, tnc);
|
||||
rtnval = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -273,7 +256,7 @@ namespace VEPROMS
|
||||
}
|
||||
private void LoadProcedures(DocVersionInfo dvi, TreeNode tnc)
|
||||
{
|
||||
foreach (ProcedureInfo pi in dvi.Procedures)
|
||||
foreach (ProcedureInfo pi in dvi.Procedures.OfType<ProcedureInfo>())
|
||||
{
|
||||
TreeNode tn = tnc.Nodes.Add(string.Format("{0} {1}", pi.DisplayNumber, pi.DisplayText));
|
||||
myProcedures.Add(tn, pi);
|
||||
@@ -327,7 +310,7 @@ namespace VEPROMS
|
||||
// C2023-002: Loop through the docversion's procedures to determine which cannot be open and add to
|
||||
// list. The frmBatchRefreshCheckedOut dialog operates on procedures, not docversions.
|
||||
string msgp = string.Empty;
|
||||
foreach (ProcedureInfo pi in dq.Procedures)
|
||||
foreach (ProcedureInfo pi in dq.Procedures.OfType<ProcedureInfo>())
|
||||
{
|
||||
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref msgp)) pil.Add(pi);
|
||||
}
|
||||
@@ -520,7 +503,6 @@ namespace VEPROMS
|
||||
foreach (TreeNode tn in myProcedures.Keys)
|
||||
if (tn.Checked)
|
||||
pil.Add(myProcedures[tn]);
|
||||
//PopulateTransitionInfoLists(pil);
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText("Refresh Transitions");
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
@@ -710,7 +692,7 @@ namespace VEPROMS
|
||||
cc.Save();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
return -cntfix;
|
||||
@@ -722,42 +704,6 @@ namespace VEPROMS
|
||||
}
|
||||
return cntfix;
|
||||
}
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// tool renamed to Identify Orphan Items
|
||||
private void IdentifyDisconnectedItems()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText("Identifing Orphan Items");
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
|
||||
txtProcess.AppendText(string.Format("Orphan Items Count: {0}", rowCount));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
if (rowCount > 0)
|
||||
{
|
||||
txtResults.AppendText(string.Format("The database contains {0} Orphan items.", rowCount));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText("These can be removed via the Remove Orphan Data Records in the Repair tools");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtResults.AppendText("No Orphan Records Found");// B2017-108 Always output results even if there isn't any
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
this.Cursor = Cursors.Default;
|
||||
//MessageBox.Show(string.Format("{0} Completed", "Orphan Items Check"), "Orphan Items");
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// tool renamed to Remove Orphan Items
|
||||
@@ -777,8 +723,6 @@ namespace VEPROMS
|
||||
int rowCount2 = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
|
||||
txtProcess.AppendText(string.Format("Orphan Items Purged: {0}", rowCount));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
//txtProcess.AppendText(Environment.NewLine);
|
||||
//txtResults.Clear();
|
||||
txtResults.AppendText(string.Format("The database contained {0} Orphan items.", rowCount));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
@@ -795,11 +739,10 @@ namespace VEPROMS
|
||||
}
|
||||
else
|
||||
{
|
||||
//txtResults.Clear();
|
||||
txtResults.AppendText(string.Format("The database contained {0} Orphan items.", rowCount));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(string.Format("No Orpan Items to Purge!"));
|
||||
txtResults.AppendText("No Orpan Items to Purge!");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
@@ -811,45 +754,6 @@ namespace VEPROMS
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// is one of two tools run from Check Obsolete RO Data
|
||||
private void IdentifyUnusedRoFstsAndFigures()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText("Identifing Unused RoFsts and Figures");
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
|
||||
int rowCountFigures = ESP_GetUnusedFigures.Execute("vesp_GetUnusedFiguresCount");
|
||||
txtProcess.AppendText(string.Format("Unused RoFsts Count: {0}, Unused Figures Count: {1}", rowCountRoFst, rowCountFigures));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
if (rowCountRoFst > 0 || rowCountFigures > 0)
|
||||
{
|
||||
txtResults.AppendText(string.Format("The database contains {0} unused RoFsts.", rowCountRoFst));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(string.Format("The database contains {0} unused Figures items.", rowCountFigures));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtResults.AppendText("No Unused RoFsts or Figures Found"); // B2017-108 Always output results even if there isn't any
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface is one of two tools run from Remove Obsolete RO Data
|
||||
private void RemoveUnusedRoFstsAndFigures()
|
||||
{
|
||||
@@ -893,41 +797,7 @@ namespace VEPROMS
|
||||
{
|
||||
txtProcess.AppendText(string.Format("The database contained {0} unused RoFSTs or Figures.", rowCountRoFst + rowCountFigures));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(string.Format("No Unused ROFSTs To Remove."));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// is one of two tools run from Check Obsolete RO Data
|
||||
private void IdentifyROAssociations()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText("Identifing Unused RO Associations");
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
|
||||
txtProcess.AppendText(string.Format("Unused RO Associations Count: {0}", rowCount));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
if (rowCount > 0)
|
||||
{
|
||||
txtResults.AppendText(string.Format("The database contains {0} unused RO Associations.", rowCount));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtResults.AppendText("No unused RO Associations Found");// B2017-108 Always output results even if there isn't any
|
||||
txtResults.AppendText("No Unused ROFSTs To Remove.");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
@@ -976,7 +846,7 @@ namespace VEPROMS
|
||||
txtResults.AppendText(string.Format("The database contained {0} Unused RO Associations.", rowCount));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(string.Format("No Unused RO Associations to Purge."));
|
||||
txtResults.AppendText("No Unused RO Associations to Purge.");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
@@ -988,49 +858,6 @@ namespace VEPROMS
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// tool was renamed to Hidden Data Locations (on Check list)
|
||||
private void IdentifyNonEditableItems()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText("Identifing Hidden Item Locations");
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
List<ItemInfo> myItems = ESP_IdentifyNonEditableItems.Execute("vesp_GetNonEditableItems");
|
||||
txtProcess.AppendText(string.Format("Hidden Items Count: {0}", myItems.Count));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
if (myItems.Count > 0)
|
||||
{
|
||||
txtResults.AppendText("The following items are hidden (non-editable)...");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
foreach (ItemInfo ii in myItems)
|
||||
{
|
||||
txtResults.AppendText(ii.Path);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtResults.AppendText("No Hidden Data Found");// B2017-108 Always output results even if there isn't any
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
//C2025-011 RO Update Admin Tool Memory Enhancements
|
||||
//clear the list since no longer using it
|
||||
myItems.Clear();
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
// tool was renamed to Show Users
|
||||
private void GetDatabaseSessions()
|
||||
@@ -1095,7 +922,6 @@ namespace VEPROMS
|
||||
return;
|
||||
}
|
||||
|
||||
//FileInfo fiRofst = new FileInfo(rofstPath);
|
||||
Cursor = Cursors.WaitCursor;
|
||||
|
||||
using (DocVersion dv = DocVersion.Get(dq.VersionID))
|
||||
@@ -1109,7 +935,6 @@ namespace VEPROMS
|
||||
}
|
||||
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, txtProcess);
|
||||
//ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, null);
|
||||
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
}
|
||||
|
||||
@@ -1122,14 +947,13 @@ namespace VEPROMS
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private void RefreshProcedureTransitions(ProcedureInfo pq)
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
ProcedureInfo.ResetTranCounters();
|
||||
ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable);
|
||||
ProcedureInfo.RefreshTransitions(pq);
|
||||
TimeSpan ts = DateTime.Now - start;
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
||||
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Cant Fix (Annotation: Bad Transition Link) {5} Transitions{0}Elapsed Seconds:{6}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount, ts.TotalSeconds));
|
||||
@@ -1145,42 +969,7 @@ namespace VEPROMS
|
||||
return VlnFlexGrid.ROTableUpdate(sender, args);
|
||||
}
|
||||
|
||||
private void PopulateTransitionInfoLists(List<ProcedureInfo> pil)
|
||||
{
|
||||
Dictionary<int, int> dic = new Dictionary<int, int>();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (ProcedureInfo pi in pil)
|
||||
if (!dic.ContainsKey(pi.MyDocVersion.VersionID))
|
||||
{
|
||||
dic.Add(pi.MyDocVersion.VersionID, pi.MyDocVersion.VersionID);
|
||||
sb.Append(sb.Length == 0 ? pi.MyDocVersion.VersionID.ToString() : "," + pi.MyDocVersion.VersionID.ToString());
|
||||
}
|
||||
txtProcess.AppendText("Preparing to process...");
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
//transitionsToDisconnected = TransitionInfoList.GetTransitionsToDisconnected(sb.ToString());
|
||||
//transitionsToNonEditable = TransitionInfoList.GetTransitionsToNonEditable(sb.ToString());
|
||||
}
|
||||
|
||||
private void ProgressBarShowText()
|
||||
{
|
||||
pbProcess.Refresh();
|
||||
int percent = (int)(((double)(pbProcess.Value - pbProcess.Minimum) /
|
||||
(double)(pbProcess.Maximum - pbProcess.Minimum)) * 100);
|
||||
using (Graphics gr = pbProcess.CreateGraphics())
|
||||
{
|
||||
gr.DrawString(percent.ToString() + "%",
|
||||
SystemFonts.DefaultFont,
|
||||
Brushes.Black,
|
||||
new PointF(pbProcess.Width / 2 - (gr.MeasureString(percent.ToString() + "%",
|
||||
SystemFonts.DefaultFont).Width / 2.0F),
|
||||
pbProcess.Height / 2 - (gr.MeasureString(percent.ToString() + "%",
|
||||
SystemFonts.DefaultFont).Height / 2.0F)));
|
||||
}
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
StringBuilder myFixes;
|
||||
StringBuilder myFixes;
|
||||
int myFixesCount = 0;
|
||||
int myConvertCount = 0;
|
||||
// show the changes made in the Results pannel, include the ItemId of the step element
|
||||
@@ -1199,7 +988,6 @@ namespace VEPROMS
|
||||
{
|
||||
txtResults.AppendText(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));
|
||||
Application.DoEvents();
|
||||
//myFixes.AppendLine(string.Format("Fixed Referenced Object for {1}{0}Old Text: {2}{0}New Text: {3}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue));
|
||||
}
|
||||
else // B2018-002 - Invalid Transitions - Display Transition Cconversion Statistics
|
||||
{
|
||||
@@ -1354,14 +1142,6 @@ namespace VEPROMS
|
||||
pnlLater.Enabled = chkLater.Checked;
|
||||
}
|
||||
|
||||
// C2017-030 new Admin Tools user interface
|
||||
private void sideNavItmCheck_Click(object sender, EventArgs e)
|
||||
{
|
||||
AdminToolType = E_AdminToolType.Check;
|
||||
lblAdmToolProgressType.Text = "Checking:";
|
||||
setupProgessSteps1();
|
||||
}
|
||||
|
||||
// C2017-030 new Admin Tools user interface
|
||||
private void sideNavItmRepair_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1387,13 +1167,6 @@ namespace VEPROMS
|
||||
ResetTV(false);
|
||||
}
|
||||
|
||||
// C2017-030 new Admin Tools user interface
|
||||
private void sideNavItmUsers_Click(object sender, EventArgs e)
|
||||
{
|
||||
AdminToolType = E_AdminToolType.Users;
|
||||
setupProgessSteps1();
|
||||
}
|
||||
|
||||
// C2017-030 new Admin Tools user interface
|
||||
private void sideNavItmExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1413,27 +1186,18 @@ namespace VEPROMS
|
||||
ResetDelTV(false);
|
||||
}
|
||||
|
||||
// new Admin Tools user interface for deletes
|
||||
//private void sideNavItmDelete_Click_1(object sender, EventArgs e)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
#region On/Off Swiches
|
||||
|
||||
// C2017-030 new Admin Tools user interface
|
||||
private enum E_AdminToolType : int
|
||||
{
|
||||
Check = 0,
|
||||
Repair = 1,
|
||||
Links = 2,
|
||||
Users = 3,
|
||||
Delete = 4
|
||||
};
|
||||
private E_AdminToolType AdminToolType = 0;
|
||||
|
||||
DevComponents.DotNetBar.StepItem siOrphDatRecs = new DevComponents.DotNetBar.StepItem("siOrphDatRecs", "Orphan Data Records");
|
||||
DevComponents.DotNetBar.StepItem siHiddenDataLocs = new DevComponents.DotNetBar.StepItem("siHiddenDataLocs", "Hidden Data");
|
||||
DevComponents.DotNetBar.StepItem siObsoleteROData = new DevComponents.DotNetBar.StepItem("siObsoleteROData", "Obsolete RO Data");
|
||||
DevComponents.DotNetBar.StepItem siStandardHyphens = new DevComponents.DotNetBar.StepItem("siStandardHyphens", "Standardize Hyphens");
|
||||
DevComponents.DotNetBar.StepItem siRefreshAttmts = new DevComponents.DotNetBar.StepItem("siRefreshAttmts", "Refresh Word Attachments");
|
||||
@@ -1446,18 +1210,6 @@ namespace VEPROMS
|
||||
|
||||
switch (AdminToolType)
|
||||
{
|
||||
case E_AdminToolType.Check:
|
||||
if (swCkOrphanDataRecs.Value)
|
||||
progressSteps1.Items.Add(siOrphDatRecs);
|
||||
if (swHiddenDataLocs.Value)
|
||||
progressSteps1.Items.Add(siHiddenDataLocs);
|
||||
if (swCkObsoleteROData.Value)
|
||||
progressSteps1.Items.Add(siObsoleteROData);
|
||||
splitContainer3.Panel2Collapsed = false;
|
||||
progressSteps1.Visible = true;
|
||||
progressSteps1.Refresh();
|
||||
break;
|
||||
|
||||
case E_AdminToolType.Repair:
|
||||
if (swRmOrphanDataRecs.Value)
|
||||
progressSteps1.Items.Add(siOrphDatRecs);
|
||||
@@ -1475,7 +1227,6 @@ namespace VEPROMS
|
||||
break;
|
||||
|
||||
case E_AdminToolType.Links:
|
||||
case E_AdminToolType.Users:
|
||||
splitContainer3.Panel2Collapsed = true;
|
||||
progressSteps1.Visible = false;
|
||||
break;
|
||||
@@ -1532,7 +1283,6 @@ namespace VEPROMS
|
||||
private void StepProgress(int prgStpIdx, int val)
|
||||
{
|
||||
((DevComponents.DotNetBar.StepItem)progressSteps1.Items[prgStpIdx]).Value = val;
|
||||
return;
|
||||
}
|
||||
|
||||
private void ClearStepProgress()
|
||||
@@ -1595,42 +1345,6 @@ namespace VEPROMS
|
||||
CheckROLinks(); // C2022-028 check for Bad RO Links
|
||||
}
|
||||
|
||||
private void btnRunCheck_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CheckProcessLater()) return; // delay processing if set//B2017-221 Allow the batch dialog to close when waiting to process.
|
||||
|
||||
int prgStpIdx = -1;
|
||||
txtResults.Clear();
|
||||
txtProcess.Clear();
|
||||
|
||||
if (swCkOrphanDataRecs.Value)
|
||||
{
|
||||
StepProgress(++prgStpIdx, 50);
|
||||
IdentifyDisconnectedItems(); // orphan items
|
||||
StepProgress(prgStpIdx, 100);
|
||||
}
|
||||
|
||||
if (swHiddenDataLocs.Value)
|
||||
{
|
||||
StepProgress(++prgStpIdx, 50);
|
||||
IdentifyNonEditableItems(); // hidden items
|
||||
StepProgress(prgStpIdx, 100);
|
||||
}
|
||||
|
||||
if (swCkObsoleteROData.Value)
|
||||
{
|
||||
StepProgress(++prgStpIdx, 25);
|
||||
IdentifyROAssociations();
|
||||
StepProgress(prgStpIdx, 50);
|
||||
IdentifyUnusedRoFstsAndFigures();
|
||||
StepProgress(prgStpIdx, 100);
|
||||
}
|
||||
|
||||
MessageBox.Show("Check Functions Completed", "Check");
|
||||
|
||||
ClearStepProgress();
|
||||
}
|
||||
|
||||
private void btnRunRepair_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CheckProcessLater()) return; // delay processing if set//B2017-221 Allow the batch dialog to close when waiting to process.
|
||||
@@ -1755,12 +1469,12 @@ namespace VEPROMS
|
||||
if (!MySessionInfo.CanCheckOutItem(dq.VersionID, CheckOutType.DocVersion, ref msg))
|
||||
{
|
||||
string msgp = string.Empty;
|
||||
foreach (ProcedureInfo pi in dq.Procedures)
|
||||
foreach (ProcedureInfo pi in dq.Procedures.OfType<ProcedureInfo>())
|
||||
{
|
||||
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref msgp))
|
||||
{
|
||||
FolderInfo fi = (FolderInfo)dq.ActiveParent;
|
||||
int itemID = (int)fi.FolderID;
|
||||
int itemID = fi.FolderID;
|
||||
string folderName = fi.Name;
|
||||
|
||||
if (swDeleteFolder.Value)
|
||||
@@ -1853,7 +1567,7 @@ namespace VEPROMS
|
||||
{
|
||||
//Gather folder information
|
||||
FolderInfo fi = (FolderInfo)kvp.ActiveParent;
|
||||
int itemID = (int)fi.FolderID;
|
||||
int itemID = fi.FolderID;
|
||||
string folderName = fi.Name;
|
||||
|
||||
// Perform the deletion operation
|
||||
@@ -1877,8 +1591,8 @@ namespace VEPROMS
|
||||
foreach (var kvp in emptyFoldersToDelete)
|
||||
{
|
||||
//Gather folder information
|
||||
FolderInfo fi = (FolderInfo)kvp;
|
||||
int itemID = (int)fi.FolderID;
|
||||
FolderInfo fi = kvp;
|
||||
int itemID = fi.FolderID;
|
||||
string folderName = fi.Name;
|
||||
|
||||
// Perform the deletion operation
|
||||
@@ -1929,9 +1643,8 @@ namespace VEPROMS
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
string err = ex.ToString();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user