Added code to handle non-date formatted revision dates (eg: DRAFT)
Modified method to populate ContentAuditInfoList used in chronology and summary report Modified method to populate AnnotationAuditInfoList used in chronology and summary report Modified code to use ChangeBarDate when preparing chronology and summary reports
This commit is contained in:
parent
2ecad446a4
commit
d650f1c98b
@ -156,7 +156,12 @@ namespace Volian.Controls.Library
|
||||
if (cfg.Print_RevDate == null || cfg.Print_RevDate == string.Empty)
|
||||
SetRevDate(MyProcedureInfo.DTS);
|
||||
else
|
||||
SetRevDate(DateTime.Parse(cfg.Print_RevDate));
|
||||
{
|
||||
DateTime revDate;
|
||||
if (!DateTime.TryParse(cfg.Print_RevDate, out revDate)) revDate = DateTime.Now;
|
||||
SetRevDate(revDate);
|
||||
//SetRevDate(DateTime.Parse(cfg.Print_RevDate));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -490,15 +495,15 @@ namespace Volian.Controls.Library
|
||||
AnnotationAuditInfoList aail2;
|
||||
if (ApplDisplayMode > 0)
|
||||
{
|
||||
cail2 = ContentAuditInfoList.GetChronologyByUnit(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false, ApplDisplayMode);
|
||||
cail3 = ContentAuditInfoList.GetSummaryByUnit(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false, ApplDisplayMode);
|
||||
aail2 = AnnotationAuditInfoList.GetChronologyByUnit(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, ApplDisplayMode);
|
||||
cail2 = ContentAuditInfoList.GetChronologyByUnit(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false, ApplDisplayMode, MyProcedureInfo.ChangeBarDate);
|
||||
cail3 = ContentAuditInfoList.GetSummaryByUnit(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false, ApplDisplayMode, MyProcedureInfo.ChangeBarDate);
|
||||
aail2 = AnnotationAuditInfoList.GetChronologyByUnit(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, ApplDisplayMode, MyProcedureInfo.ChangeBarDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
cail2 = ContentAuditInfoList.GetChronology(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false);
|
||||
cail3 = ContentAuditInfoList.GetSummary(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false);
|
||||
aail2 = AnnotationAuditInfoList.GetChronology(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID);
|
||||
cail2 = ContentAuditInfoList.GetChronology(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false, MyProcedureInfo.ChangeBarDate);
|
||||
cail3 = ContentAuditInfoList.GetSummary(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, false, MyProcedureInfo.ChangeBarDate);
|
||||
aail2 = AnnotationAuditInfoList.GetChronology(MyProcedureInfo.ItemID, MyProcedureInfo.ItemID, MyProcedureInfo.ChangeBarDate);
|
||||
}
|
||||
//Console.WriteLine("WalkProcedure cail2: {0} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalSeconds);
|
||||
_ChronologyAuditList = cail2;
|
||||
@ -551,7 +556,7 @@ namespace Volian.Controls.Library
|
||||
//if (lbChanges.Items.Count > 0)
|
||||
//{
|
||||
//jcb added 20120425 to suppress annotations in report
|
||||
_AnnotationList = AnnotationAuditInfoList.GetChronology(0, 0);
|
||||
_AnnotationList = AnnotationAuditInfoList.GetChronology(0, 0, MyProcedureInfo.ChangeBarDate);
|
||||
//added setting selected slave in order for reports to replace unit number,etc jcb 20101010
|
||||
MyItemInfo.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = ApplDisplayMode;
|
||||
OnChronologyPrintRequest(new DisplayHistoryReportEventArgs(Volian.Base.Library.VlnSettings.TemporaryFolder + @"\MyChronology.pdf", MyItemInfo.MyProcedure, _ChronologyAuditList, _AnnotationList));
|
||||
@ -563,7 +568,7 @@ namespace Volian.Controls.Library
|
||||
//if (lbChanges.Items.Count > 0)
|
||||
//{
|
||||
//jcb added 20120425 to suppress annotations in report
|
||||
_AnnotationList = AnnotationAuditInfoList.GetChronology(0, 0);
|
||||
_AnnotationList = AnnotationAuditInfoList.GetChronology(0, 0, MyProcedureInfo.ChangeBarDate);
|
||||
//added setting selected slave in order for reports to replace unit number,etc jcb 20101010
|
||||
MyItemInfo.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = ApplDisplayMode;
|
||||
OnSummaryPrintRequest(new DisplayHistoryReportEventArgs(Volian.Base.Library.VlnSettings.TemporaryFolder + @"\MySummary.pdf", MyItemInfo.MyProcedure, _SummaryAuditList, _AnnotationList));
|
||||
|
@ -272,7 +272,7 @@ namespace Volian.Print.Library
|
||||
if (cai.ContentID != lastID) maxDTS = DateTime.MinValue;
|
||||
h = new Phrase();
|
||||
h.Font = f3;
|
||||
string actionWhat = (cai.ActionWhat == "Added" && cai.DTS <= MyProc.DTS) ? "Original" : cai.ActionWhat != "Changed" ? cai.ActionWhat : cai.DTS <= maxDTS ? "Restored" : cai.DTS > MyProc.DTS ? cai.ActionWhat : "Original";
|
||||
string actionWhat = (cai.ActionWhat == "Added" && cai.DTS <= MyProc.ChangeBarDate) ? "Original" : cai.ActionWhat != "Changed" ? cai.ActionWhat : cai.DTS <= maxDTS ? "Restored" : cai.DTS > MyProc.ChangeBarDate ? cai.ActionWhat : "Original";
|
||||
if (actionWhat == "Deleted" || actionWhat == "Restored")
|
||||
h.Add(actionWhat + "\r\n" + cai.ActionWhen.ToString());
|
||||
else
|
||||
@ -689,7 +689,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
auditList.Add(firstCAI);
|
||||
}
|
||||
else if (lastCAI.ActionWhat == "Deleted" && firstCAI.DTS < MyProc.DTS)
|
||||
else if (lastCAI.ActionWhat == "Deleted" && firstCAI.DTS < MyProc.ChangeBarDate)
|
||||
{
|
||||
auditList.Add(lastCAI);
|
||||
}
|
||||
@ -736,7 +736,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.DTS)
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.ChangeBarDate)
|
||||
{
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
@ -845,7 +845,7 @@ namespace Volian.Print.Library
|
||||
//what
|
||||
h = new Phrase();
|
||||
h.Font = f3;
|
||||
h.Add(cai.ActionWhen > MyProc.DTS ? cai.ActionWhat : "Original");
|
||||
h.Add(cai.ActionWhen > MyProc.ChangeBarDate ? cai.ActionWhat : "Original");
|
||||
c = new PdfPCell(h);
|
||||
c.Colspan = 1;
|
||||
c.HorizontalAlignment = Element.ALIGN_CENTER;
|
||||
@ -1009,7 +1009,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat != "Deleted")
|
||||
{
|
||||
if (firstCAI.DTS > MyProc.DTS)
|
||||
if (firstCAI.DTS > MyProc.ChangeBarDate)
|
||||
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
|
||||
@ -1038,7 +1038,7 @@ namespace Volian.Print.Library
|
||||
firstCAI = null;
|
||||
lastCAI = null;
|
||||
}
|
||||
else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Changed" && firstCAI.DTS > MyProc.DTS)
|
||||
else if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat == "Changed" && firstCAI.DTS > MyProc.ChangeBarDate)
|
||||
{
|
||||
lastCAI.ActionWhat = firstCAI.ActionWhat;
|
||||
auditList.Add(lastCAI);
|
||||
@ -1075,7 +1075,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (firstCAI.ActionWhat == "Added" && lastCAI.ActionWhat != "Deleted")
|
||||
{
|
||||
if (firstCAI.DTS > MyProc.DTS)
|
||||
if (firstCAI.DTS > MyProc.ChangeBarDate)
|
||||
lastCAI.ActionWhat = firstCAI.ActionWhat;
|
||||
//auditList.Add(firstCAI);
|
||||
auditList.Add(lastCAI);
|
||||
@ -1131,7 +1131,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.DTS)
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.ChangeBarDate)
|
||||
{
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
@ -1172,7 +1172,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
annotationList.Add(firstAAI);
|
||||
}
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.DTS)
|
||||
else if (lastAAI.ActionWhat == "Deleted" && firstAAI.DTS < MyProc.ChangeBarDate)
|
||||
{
|
||||
annotationList.Add(lastAAI);
|
||||
}
|
||||
@ -1348,7 +1348,7 @@ namespace Volian.Print.Library
|
||||
h = new Phrase();
|
||||
h.Font = f3;
|
||||
// h.Add(cai.ActionWhen > MyProc.DTS ? cai.ActionWhat : "Original");
|
||||
string actionWhat = ((cai.ActionWhat == "Added" || cai.ActionWhat == "Changed") && cai.DTS <= MyProc.DTS) ? "Original" : cai.ActionWhat; //(cai.ActionWhat == "Added" && cai.DTS <= MyProc.DTS) ? "Original" : cai.ActionWhat != "Changed" ? cai.ActionWhat : cai.DTS <= maxDTS ? "Restored" : cai.DTS > MyProc.DTS ? cai.ActionWhat : "Original";
|
||||
string actionWhat = ((cai.ActionWhat == "Added" || cai.ActionWhat == "Changed") && cai.DTS <= MyProc.ChangeBarDate) ? "Original" : cai.ActionWhat; //(cai.ActionWhat == "Added" && cai.DTS <= MyProc.DTS) ? "Original" : cai.ActionWhat != "Changed" ? cai.ActionWhat : cai.DTS <= maxDTS ? "Restored" : cai.DTS > MyProc.DTS ? cai.ActionWhat : "Original";
|
||||
if (actionWhat == "Deleted" || actionWhat == "Restored")
|
||||
h.Add(actionWhat + "\r\n" + cai.ActionWhen.ToString());
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user