Add "No Audit Details Available" when entry has no supporting audit details when building Chronology report

Change text in Chronology report to support multi unit text
Added condition to determine when to process content audit info item in Summary report
Added required closing brace
Added condition to determine when to process annotation audit info item in Summary report
Changed how ROFSTLookup value was set to support multi unit
Changed how DocVersionInfo is obtained to support multi unit
Assigns ROFstInfo objects docVer property to support multi unit
This commit is contained in:
Rich 2012-12-04 23:12:19 +00:00
parent 50c04033ac
commit 80ca2a7109
3 changed files with 185 additions and 130 deletions

View File

@ -337,6 +337,17 @@ namespace Volian.Print.Library
//c.Border = borders;
t.AddCell(c);
}
else
{
h = new Phrase();
h.Font = f4;
c = new PdfPCell(h);
h.Add("No Audit Details Available");
c.Colspan = cols - 4;
c.HorizontalAlignment = Element.ALIGN_LEFT;
c.PaddingBottom = paddingBottom;
t.AddCell(c);
}
}
else
{
@ -347,7 +358,39 @@ namespace Volian.Print.Library
else if (cai.Text == oldText && cai.TypeName != oldTypeName)
h.Add(oldTypeName + " to " + cai.TypeName);
else
h.Add(ItemInfo.ConvertToDisplayText(cai.Text));
{
string txt = ItemInfo.ConvertToDisplayText(cai.Text);
if (MyProc.MyDocVersion.MultiUnitCount > 1)
{
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
xd.LoadXml(cai.Config);
System.Xml.XmlNode nd = xd.SelectSingleNode("//MasterSlave");
if (nd == null)
txt += "\r\n\r\nApplicable to all units";
else
{
nd = nd.Attributes.GetNamedItem("Applicability");
if (nd.InnerText == "0")
txt += "\r\n\r\nApplicable to no units";
else
{
int k = MyProc.MyDocVersion.DocVersionConfig.SelectedSlave;
string[] myss = nd.InnerText.Split(",".ToCharArray());
string un = "\r\n\r\nApplicable to ";
string sep = string.Empty;
foreach (string ss in myss)
{
MyProc.MyDocVersion.DocVersionConfig.SelectedSlave = int.Parse(ss);
un += sep + MyProc.MyDocVersion.DocVersionConfig.Unit_Name;
sep = ",";
}
txt += un;
MyProc.MyDocVersion.DocVersionConfig.SelectedSlave = k;
}
}
}
h.Add(txt);
}
oldText = cai.Text;
oldTypeName = cai.TypeName;
c = new PdfPCell(h);
@ -948,6 +991,8 @@ namespace Volian.Print.Library
ContentAuditInfo lastCAI = null;
List<ContentAuditInfo> auditList = new List<ContentAuditInfo>();
foreach (ContentAuditInfo cai in AuditList)
{
if (MyProc.MyLookup == null || MyProc.MyLookup.ContainsKey(cai.ItemID))
{
if (cai.ContentID != contentID) //new content
{
@ -1017,6 +1062,7 @@ namespace Volian.Print.Library
else
lastCAI = cai;
}
}
if (lastCAI == null)
{
if (firstCAI != null)
@ -1073,6 +1119,8 @@ namespace Volian.Print.Library
int annotationID = 0;
List<AnnotationAuditInfo> annotationList = new List<AnnotationAuditInfo>();
foreach (AnnotationAuditInfo aai in AnnotationList)
{
if (MyProc.MyLookup == null || MyProc.MyLookup.ContainsKey(aai.ItemID))
{
if (aai.AnnotationID != annotationID)
{
@ -1117,6 +1165,7 @@ namespace Volian.Print.Library
else
lastAAI = aai;
}
}
if (firstAAI != null)
{
if (lastAAI == null)

View File

@ -297,7 +297,11 @@ namespace Volian.Print.Library
{
// Dictionary<string, List<string>> ros = new Dictionary<string, List<string>>();
Dictionary<string, Dictionary<string, bool>> ros = new Dictionary<string, Dictionary<string, bool>>();
ROFSTLookup lu = MyItemInfoList[0].MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup;
DocVersionInfo dvi = MyItemInfoList[0].MyDocVersion;
ROFstInfo rofst = dvi.DocVersionAssociations[0].MyROFst;
rofst.docVer = dvi;
// ROFSTLookup lu = MyItemInfoList[0].MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup;
ROFSTLookup lu = rofst.ROFSTLookup;
if (types.ContainsKey(0))
{
foreach (ProcedureInfo pi in MyItemInfoList)

View File

@ -1011,8 +1011,10 @@ namespace Volian.Print.Library
if (itemInfo.MyContent.Text != null)
{
ProcedureInfo proc = itemInfo.MyProcedure;
DocVersionInfo dvi = proc.ActiveParent as DocVersionInfo;
// DocVersionInfo dvi = proc.ActiveParent as DocVersionInfo;
DocVersionInfo dvi = proc.MyDocVersion;
ROFstInfo rofst = dvi.DocVersionAssociations[0].MyROFst;
rofst.docVer = dvi;
ROFSTLookup lookup = rofst.ROFSTLookup;
string linkInfoText = itemInfo.MyContent.Text.Replace(@"\v ", "");
Match m = Regex.Match(linkInfoText, @"(.*)[#]Link:([A-Za-z]*):(.*)");