B2022-112: Approve of procedure with subsequent Create Procedure to Import crashes
This commit is contained in:
parent
8725bc506b
commit
426c87f3ba
@ -1373,7 +1373,10 @@ namespace Volian.Controls.Library
|
||||
DirectoryInfo di = new DirectoryInfo(PEIPath);
|
||||
if (!di.Exists) di.Create();
|
||||
// B2022-048: Crash when creating Procedure to Import from versions. Couldn't handle '/' in proc number.
|
||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") +"_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_").Replace("/", "-") + ".pxml";
|
||||
string fNametmp = xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_").Replace("/", "-") + ".pxml";
|
||||
// B2022-112: If applicability, need to resolve the '<' and '>' characters. Just use the UnitNames, i.e. str, from above.
|
||||
if (applIdx > 0) fNametmp = Regex.Replace(fNametmp, @"\<U-ID\>", str, RegexOptions.IgnoreCase);
|
||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp;
|
||||
xd.Save(fileName);
|
||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user