B2022-019 pass in Parent/Child even when not calling from a Parent/Child set

This commit is contained in:
2022-01-25 13:45:38 +00:00
parent 31dd017354
commit 77ff645e2c
4 changed files with 48 additions and 30 deletions

View File

@@ -3129,12 +3129,15 @@ namespace Volian.Controls.Library
// C2017-003: ro data in sql server, check for sql connection string
if (myRODB.DBConnectionString != "cstring") args = args + " \"" + myRODB.DBConnectionString + "\"";
// C2021-026 pass in Parent/Child information (list of the children)
DocVersionConfig dvc = Mydvi.DocVersionConfig as DocVersionConfig;
if (dvc != null)
// B2022-019 look at all DocVersions to find ParentChild information
// to ensure we pass in Parent/Child even when not coming from a Parent/Child procedure set
DocVersionInfoList dvil = DocVersionInfoList.Get();
foreach (DocVersionInfo dvi in dvil)
{
string str = dvc.Unit_Name;
if (str!="" && str!="0")
args += " \"PC=" + str + "\"";
DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0")
args += " \"PC=" + dvc.Unit_Name + "\"";
break;
}
System.Diagnostics.Process.Start(roapp, args);
}
@@ -3293,12 +3296,15 @@ namespace Volian.Controls.Library
// C2017-003: ro data in sql server, check for sql connection string
if (Mydvi.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring") roloc = roloc + " \"" + Mydvi.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString + "\"";
// C2021-026 pass in Parent/Child information (list of the children)
DocVersionConfig dvc = Mydvi.DocVersionConfig as DocVersionConfig;
if (dvc != null)
// B2022-019 look at all DocVersions to find ParentChild information
// to ensure we pass in Parent/Child even when not coming from a Parent/Child procedure set
DocVersionInfoList dvil = DocVersionInfoList.Get();
foreach (DocVersionInfo dvi in dvil)
{
string str = dvc.Unit_Name;
if (str!="" && str!="0")
roloc += " \"PC=" + str + "\"";
DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0")
roloc += " \"PC=" + dvc.Unit_Name + "\"";
break;
}
System.Diagnostics.Process.Start(roapp, roloc);
}