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:
@@ -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);
|
||||
@@ -949,73 +992,76 @@ namespace Volian.Print.Library
|
||||
List<ContentAuditInfo> auditList = new List<ContentAuditInfo>();
|
||||
foreach (ContentAuditInfo cai in AuditList)
|
||||
{
|
||||
if (cai.ContentID != contentID) //new content
|
||||
if (MyProc.MyLookup == null || MyProc.MyLookup.ContainsKey(cai.ItemID))
|
||||
{
|
||||
if (firstCAI != null) //not first row
|
||||
if (cai.ContentID != contentID) //new content
|
||||
{
|
||||
if (lastCAI == null)
|
||||
if (firstCAI != null) //not first row
|
||||
{
|
||||
auditList.Add(firstCAI);
|
||||
firstCAI = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastCAI.DTS > firstCAI.DTS)
|
||||
if (lastCAI == null)
|
||||
{
|
||||
if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat != "Deleted")
|
||||
auditList.Add(firstCAI);
|
||||
firstCAI = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastCAI.DTS > firstCAI.DTS)
|
||||
{
|
||||
if (firstCAI.DTS > MyProc.DTS)
|
||||
lastCAI.ActionWhat = firstCAI.ActionWhat;
|
||||
//this step was originally commented out, then jcb un commented it, but we saw a summary report that had 2 added rows
|
||||
//for the same step which is highly undesirable, so we commented it out again 1/17/2012
|
||||
//for example we added 2 steps, then make a change to 1st step added
|
||||
//auditList.Add(firstCAI); //jcb uncommented
|
||||
if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat != "Deleted")
|
||||
{
|
||||
if (firstCAI.DTS > MyProc.DTS)
|
||||
lastCAI.ActionWhat = firstCAI.ActionWhat;
|
||||
//this step was originally commented out, then jcb un commented it, but we saw a summary report that had 2 added rows
|
||||
//for the same step which is highly undesirable, so we commented it out again 1/17/2012
|
||||
//for example we added 2 steps, then make a change to 1st step added
|
||||
//auditList.Add(firstCAI); //jcb uncommented
|
||||
auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else if (firstCAI.ActionWhat == lastCAI.ActionWhat)
|
||||
{
|
||||
auditList.Add(firstCAI);
|
||||
auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
}
|
||||
else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Deleted" && firstCAI.DTS == lastCAI.DTS)
|
||||
{
|
||||
//auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Changed" && firstCAI.DTS > MyProc.DTS)
|
||||
{
|
||||
lastCAI.ActionWhat = firstCAI.ActionWhat;
|
||||
auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else if (firstCAI.ActionWhat == lastCAI.ActionWhat)
|
||||
{
|
||||
auditList.Add(firstCAI);
|
||||
auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
//added by jcb
|
||||
//else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Changed" && firstCAI.DTS == lastCAI.DTS)
|
||||
//{
|
||||
// auditList.Add(firstCAI);
|
||||
// auditList.Add(lastCAI);
|
||||
// firstCAI = null;
|
||||
// lastCAI = null;
|
||||
//}
|
||||
}
|
||||
else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Deleted" && firstCAI.DTS == lastCAI.DTS)
|
||||
{
|
||||
//auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Changed" && firstCAI.DTS > MyProc.DTS)
|
||||
{
|
||||
lastCAI.ActionWhat = firstCAI.ActionWhat;
|
||||
auditList.Add(lastCAI);
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
//added by jcb
|
||||
//else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Changed" && firstCAI.DTS == lastCAI.DTS)
|
||||
//{
|
||||
// auditList.Add(firstCAI);
|
||||
// auditList.Add(lastCAI);
|
||||
// firstCAI = null;
|
||||
// lastCAI = null;
|
||||
//}
|
||||
}
|
||||
firstCAI = cai;
|
||||
lastCAI = null;
|
||||
contentID = cai.ContentID;
|
||||
}
|
||||
firstCAI = cai;
|
||||
lastCAI = null;
|
||||
contentID = cai.ContentID;
|
||||
else
|
||||
lastCAI = cai;
|
||||
}
|
||||
else
|
||||
lastCAI = cai;
|
||||
}
|
||||
if (lastCAI == null)
|
||||
{
|
||||
@@ -1074,48 +1120,51 @@ namespace Volian.Print.Library
|
||||
List<AnnotationAuditInfo> annotationList = new List<AnnotationAuditInfo>();
|
||||
foreach (AnnotationAuditInfo aai in AnnotationList)
|
||||
{
|
||||
if (aai.AnnotationID != annotationID)
|
||||
if (MyProc.MyLookup == null || MyProc.MyLookup.ContainsKey(aai.ItemID))
|
||||
{
|
||||
annotationID = aai.AnnotationID;
|
||||
if (firstAAI != null)
|
||||
if (aai.AnnotationID != annotationID)
|
||||
{
|
||||
if (lastAAI == null)
|
||||
annotationID = aai.AnnotationID;
|
||||
if (firstAAI != null)
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.DTS)
|
||||
{
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Changed" && firstAAI.ActionWhat != "Added") // && lastAAI.SearchText != firstAAI.SearchText)
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Changed" && firstAAI.ActionWhat == "Added") // && lastAAI.SearchText != firstAAI.SearchText)
|
||||
{
|
||||
lastAAI.ActionWhat = firstAAI.ActionWhat;
|
||||
annotationList.Add(lastAAI);
|
||||
firstAAI = null;
|
||||
if (lastAAI == null)
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.DTS)
|
||||
{
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Changed" && firstAAI.ActionWhat != "Added") // && lastAAI.SearchText != firstAAI.SearchText)
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Changed" && firstAAI.ActionWhat == "Added") // && lastAAI.SearchText != firstAAI.SearchText)
|
||||
{
|
||||
lastAAI.ActionWhat = firstAAI.ActionWhat;
|
||||
annotationList.Add(lastAAI);
|
||||
firstAAI = null;
|
||||
lastAAI = null;
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Restored" && firstAAI.ActionWhat == "Added") // && lastAAI.SearchText != firstAAI.SearchText)
|
||||
{
|
||||
lastAAI.ActionWhat = firstAAI.ActionWhat;
|
||||
annotationList.Add(lastAAI);
|
||||
firstAAI = null;
|
||||
lastAAI = null;
|
||||
}
|
||||
else if (lastAAI == null && firstAAI.ActionWhat == "Added")
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
lastAAI = null;
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Restored" && firstAAI.ActionWhat == "Added") // && lastAAI.SearchText != firstAAI.SearchText)
|
||||
{
|
||||
lastAAI.ActionWhat = firstAAI.ActionWhat;
|
||||
annotationList.Add(lastAAI);
|
||||
firstAAI = null;
|
||||
lastAAI = null;
|
||||
}
|
||||
else if (lastAAI == null && firstAAI.ActionWhat == "Added")
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
lastAAI = null;
|
||||
firstAAI = aai;
|
||||
}
|
||||
firstAAI = aai;
|
||||
else
|
||||
lastAAI = aai;
|
||||
}
|
||||
else
|
||||
lastAAI = aai;
|
||||
}
|
||||
if (firstAAI != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user