Added logic to keep code from crashing when adding a non-step related transition.

Added a menu item to create an Import file from an approved procedure.
Converted PDF RO References to Uppercase so that the PDF Links to the complete RO Report would work.
Eliminated Unit ROs from ROCompleteReport references in the PDF Links
Convert RO Links to Uppercase to be consistent.
This commit is contained in:
Rich 2016-01-14 22:43:26 +00:00
parent 635d6fbdf2
commit 25dc39cd75
4 changed files with 50 additions and 33 deletions

View File

@ -62,6 +62,7 @@ namespace Volian.Controls.Library
_II_IncStepNumber=cbIncStepNum.Checked;
_II_Procedure=cbTranProcs.SelectedIndex;
_II_Section=cbTranSects.SelectedIndex;
if(tvTran.SelectedNode != null)
_II_ItemID=(tvTran.SelectedNode.Tag as ItemInfo).ItemID;
}
private bool SettingsChanged

View File

@ -1009,6 +1009,13 @@ namespace Volian.Controls.Library
mirs.Tag = ri;
mirs.Click += new EventHandler(MultiUnitSummaryOfChanges_Click);
}
if (ri.LatestVersion.ApprovedXML != null)
{
MenuItem miri = mir.MenuItems.Add("Create Procedure to Import");
miri.Tag = ri;
miri.Click += new EventHandler(ImportProcedure_Click);
}
//end added jcb 20111031
mv.Tag = lastApprovedRevisionID;
}
@ -1059,7 +1066,7 @@ namespace Volian.Controls.Library
}
if (addImportMI && ri.LatestVersion.ApprovedXML != null)
{
MenuItem miri = mir.MenuItems.Add("Import Procedure");
MenuItem miri = mir.MenuItems.Add("Create Procedure to Import");
miri.Tag = ri;
miri.Click += new EventHandler(ImportProcedure_Click);
}
@ -1073,7 +1080,12 @@ namespace Volian.Controls.Library
RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
xd.LoadXml(ri.LatestVersion.ApprovedXML);
MessageBox.Show(xd.SelectSingleNode("procedure/content/@number").InnerText);
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
DirectoryInfo di = new DirectoryInfo(PEIPath);
if (!di.Exists) di.Create();
string fileName = PEIPath + "\\Approved_Rev_" + ri.RevisionNumber.Replace(" ","_") + "_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ","_").Replace(@"\u8209?", "-")+".pxml";
xd.Save(fileName);
MessageBox.Show("Approved procedure saved to import file " + fileName,"Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
void ApprovedRevision_Click(object sender, EventArgs e)

View File

@ -836,8 +836,8 @@ namespace Volian.Print.Library
PdfPCell cell = new PdfPCell();
if (MyROID != null)
{
chk.SetLocalDestination(string.Format("ROID={0}", MyROID)); // Destination
//Console.WriteLine("\"ROID\"\t\"{0}\"", MyROID);
chk.SetLocalDestination(string.Format("ROID={0}", MyROID.ToUpper())); // Destination
//Console.WriteLine("\"ROID\"\t\"{0}\"", MyROID.ToUpper());
MyROID = null;
}
p.Add(chk); // add the header chunk

View File

@ -957,10 +957,14 @@ namespace Volian.Print.Library
RoUsageInfo ru = MyItemInfo.MyContent.ContentRoUsages[0];
foreach (Chunk chk in IParagraph.Chunks)
{
chk.SetRemoteGoto("completeroreport.pdf", string.Format("ROID={0}", ru.ROID.Substring(0, 12)));
if (ru.ROID.Substring(0, 4) != "FFFF")
{
chk.SetRemoteGoto("completeroreport.pdf", string.Format("ROID={0}", ru.ROID.Substring(0, 12).ToUpper()));
//Console.WriteLine("ROID={0},{1}", ru.ROID.Substring(0, 12).ToUpper(), chk.Content);
chk.SetBackground(new Color(System.Drawing.Color.LightGreen));
}
}
}
StepConfig sc = new StepConfig(MyItemInfo.MyContent.Config);
DVEnhancedDocuments dveds = MyItemInfo.MyDocVersion.DocVersionConfig.MyEnhancedDocuments;
foreach (EnhancedDocument ed in sc.MyEnhancedDocuments)