when building an export file (from the Approved procedure) replace any forward slash or backslash used in the rev number (user types in the rev number)

This commit is contained in:
John Jenko 2016-08-12 13:29:15 +00:00
parent d46ee4e39c
commit e7a1619945

View File

@ -1223,7 +1223,7 @@ namespace Volian.Controls.Library
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
DirectoryInfo di = new DirectoryInfo(PEIPath); DirectoryInfo di = new DirectoryInfo(PEIPath);
if (!di.Exists) di.Create(); if (!di.Exists) di.Create();
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ","_") + "_"+ xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ","_").Replace(@"\u8209?", "-").Replace(@"\u9586?","_")+".pxml"; string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") +"_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_") + ".pxml";
xd.Save(fileName); xd.Save(fileName);
MessageBox.Show("Approved procedure saved to import file " + fileName,"Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("Approved procedure saved to import file " + fileName,"Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }