B2021-060 Folders were missing from the tree view in the list when there are more than two levels folders.
This commit is contained in:
parent
f3daf3b6eb
commit
1a543f663d
@ -124,15 +124,18 @@ namespace VEPROMS
|
|||||||
myTV.SelectedNode.Expand();
|
myTV.SelectedNode.Expand();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
private void LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
|
// B2021-060 Higher level folders where being removed from the tree even if there was a child folder that containe a working draft set
|
||||||
|
private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
|
||||||
{
|
{
|
||||||
bool loadedWorkingDraft = false;
|
bool loadedWorkingDraft = 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)
|
||||||
LoadChildFolders(fic, tnc, noProcs);
|
if(LoadChildFolders(fic, tnc, noProcs))
|
||||||
|
loadedChildWorkingDraft=true;
|
||||||
// B2020-114 and C2020-035 only show folders the Set Admin can access
|
// B2020-114 and C2020-035 only show folders the Set Admin can access
|
||||||
if (fic.FolderDocVersionCount > 0)
|
if (fic.FolderDocVersionCount > 0)
|
||||||
{
|
{
|
||||||
@ -142,8 +145,10 @@ namespace VEPROMS
|
|||||||
loadedWorkingDraft = true;
|
loadedWorkingDraft = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (loadedChildWorkingDraft) loadedWorkingDraft = true; // B2021-060 if child folder working draft loaded set loadedWorkingDraft
|
||||||
if (tn.Parent != null && !loadedWorkingDraft)
|
if (tn.Parent != null && !loadedWorkingDraft)
|
||||||
tn.Remove();
|
tn.Remove();
|
||||||
|
return loadedWorkingDraft;
|
||||||
}
|
}
|
||||||
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
||||||
{
|
{
|
||||||
@ -525,6 +530,7 @@ namespace VEPROMS
|
|||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user