|
|
|
@@ -10,6 +10,7 @@ using System.Data.SqlClient;
|
|
|
|
|
using System.Xml;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
using Volian.Base.Library;
|
|
|
|
|
|
|
|
|
|
namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
@@ -324,6 +325,12 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
#region ItemInfo
|
|
|
|
|
public partial class ItemInfo : IVEDrillDownReadOnly
|
|
|
|
|
{
|
|
|
|
|
private bool _PrintAllAtOnce = false;
|
|
|
|
|
public bool PrintAllAtOnce
|
|
|
|
|
{
|
|
|
|
|
get { return _PrintAllAtOnce; }
|
|
|
|
|
set { _PrintAllAtOnce = value; }
|
|
|
|
|
}
|
|
|
|
|
public SectionInfo GetSectionInfo()
|
|
|
|
|
{
|
|
|
|
|
if (this is SectionInfo) return this as SectionInfo;
|
|
|
|
@@ -439,6 +446,50 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
// return ii._ItemID == _ItemID;
|
|
|
|
|
// return false;
|
|
|
|
|
//}
|
|
|
|
|
internal static void SetFromType(ItemInfo myItemInfo)
|
|
|
|
|
{
|
|
|
|
|
myItemInfo.PrintAllAtOnce = true;
|
|
|
|
|
if (myItemInfo.MyContent.ContentPartCount > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (PartInfo pi in myItemInfo.MyContent.ContentParts)
|
|
|
|
|
{
|
|
|
|
|
ItemInfo il = null;
|
|
|
|
|
switch ((E_FromType)pi.FromType)
|
|
|
|
|
{
|
|
|
|
|
case E_FromType.Procedure:
|
|
|
|
|
myItemInfo._Procedures = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
case E_FromType.Section:
|
|
|
|
|
myItemInfo._Sections = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
case E_FromType.Step:
|
|
|
|
|
myItemInfo._Steps = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
case E_FromType.Caution:
|
|
|
|
|
myItemInfo._Cautions = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
case E_FromType.Note:
|
|
|
|
|
myItemInfo._Notes = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
case E_FromType.RNO:
|
|
|
|
|
myItemInfo._RNOs = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
case E_FromType.Table:
|
|
|
|
|
myItemInfo._Tables = pi.MyItems;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
foreach (ItemInfo ii in pi.MyItems)
|
|
|
|
|
{
|
|
|
|
|
if (ii.ItemID == 95759)
|
|
|
|
|
Console.WriteLine("\"SetFromType\",{0},{1},\"{2}\",{3}", ii.ItemID, ii.MyContent.Type, ii.DisplayNumber, ii.MyItemInfoUnique);
|
|
|
|
|
ii.FromType = (E_FromType)pi.FromType;
|
|
|
|
|
SetFromType(ii);
|
|
|
|
|
ii.MyPrevious = il;
|
|
|
|
|
il = ii;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
internal static void SetParentSectionAndDocVersion(ItemInfo itemInfo, IVEDrillDownReadOnly itemParent, SectionInfo sectionInfo, ProcedureInfo procInfo, DocVersionInfo docVersionInfo)
|
|
|
|
|
{
|
|
|
|
|
if (itemInfo == null) return;
|
|
|
|
@@ -448,15 +499,22 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
// Fix for Active Section when printing. BGE_OI4 OI27D-2
|
|
|
|
|
//itemInfo.ActiveSection = (itemInfo as SectionInfo) ?? sectionInfo;// - possible fix for not accessing correct format
|
|
|
|
|
itemInfo.ActiveSection = sectionInfo;
|
|
|
|
|
itemInfo.ActiveFormat = sectionInfo == null ? itemParent.ActiveFormat : sectionInfo.ActiveFormat;
|
|
|
|
|
itemInfo.MyProcedure = procInfo;
|
|
|
|
|
itemInfo.MyDocVersion = docVersionInfo;
|
|
|
|
|
if (itemInfo.IsStep)
|
|
|
|
|
{
|
|
|
|
|
ItemInfo ip = itemParent as ItemInfo;
|
|
|
|
|
int profileDepth = ProfileTimer.Push(">>>> itemInfo.CombinedTab");
|
|
|
|
|
itemInfo.CombinedTab = (ip == null) ? itemInfo.MyTab.CleanText.Trim() : GetCombinedTab(itemInfo, ip.CombinedTab);
|
|
|
|
|
ProfileTimer.Pop(profileDepth);
|
|
|
|
|
}
|
|
|
|
|
if (itemInfo.MyContent.ContentGridCount > 0)
|
|
|
|
|
{
|
|
|
|
|
int profileDepth1 = ProfileTimer.Push(">>>> itemInfo.MyContent.LoadNonCachedGrid");
|
|
|
|
|
itemInfo.MyContent.LoadNonCachedGrid();
|
|
|
|
|
ProfileTimer.Pop(profileDepth1);
|
|
|
|
|
}
|
|
|
|
|
if (itemInfo.MyContent.ContentPartCount > 0)
|
|
|
|
|
foreach (PartInfo pi in itemInfo.MyContent.ContentParts)
|
|
|
|
|
{
|
|
|
|
@@ -530,14 +588,15 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
internal static string GetCombinedTab(ItemInfo itemInfo, string parTab)
|
|
|
|
|
{
|
|
|
|
|
string pTab = parTab == null ? "" : parTab;
|
|
|
|
|
int profileDepth = ProfileTimer.Push( ">>>> itemInfo.MyTab.CleanText.Trim");
|
|
|
|
|
string thisTab = itemInfo.MyTab.CleanText.Trim();
|
|
|
|
|
ProfileTimer.Pop(profileDepth);
|
|
|
|
|
if (thisTab != null && thisTab != "" && !char.IsLetterOrDigit(thisTab[0])) return pTab;
|
|
|
|
|
if (itemInfo.FormatStepData.NumberWithLevel) pTab = itemInfo.MyHLS.MyTab.CleanText.Trim();
|
|
|
|
|
// if the parent tab ends with a alphanumeric and this tab is alphanumeric, add a '.' to separate them
|
|
|
|
|
bool ms = pTab != "" && char.IsLetterOrDigit(pTab.TrimEnd()[pTab.Length - 1]); // parent tab ends with alphanumeric
|
|
|
|
|
bool mn = thisTab.TrimStart().Length > 0 && char.IsLetterOrDigit(thisTab.TrimStart()[0]);// this starts with alpha
|
|
|
|
|
if (ms && mn) pTab = pTab.TrimEnd() + ".";
|
|
|
|
|
|
|
|
|
|
// remove ending '.' (if this is a hls, don't remove the '.')
|
|
|
|
|
if (!itemInfo.IsHigh && thisTab.EndsWith(".")) thisTab = thisTab.Substring(0, thisTab.Length - 1);
|
|
|
|
|
return pTab + thisTab.Trim();
|
|
|
|
@@ -550,6 +609,7 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
itemInfo.MyParent = itemParent as ItemInfo;
|
|
|
|
|
// itemInfo.ActiveSection = (itemInfo as SectionInfo) ?? sectionInfo;
|
|
|
|
|
itemInfo.ActiveSection = sectionInfo;
|
|
|
|
|
itemInfo.ActiveFormat = sectionInfo == null ? itemParent.ActiveFormat : sectionInfo.ActiveFormat;
|
|
|
|
|
itemInfo.MyDocVersion = docVersionInfo;
|
|
|
|
|
if (itemInfo.IsStep)
|
|
|
|
|
{
|
|
|
|
@@ -1137,10 +1197,23 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
#region IsType
|
|
|
|
|
private E_FromType? _FromType = null;
|
|
|
|
|
public E_FromType? FromType
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (ItemID == 95759 && _FromType == null)
|
|
|
|
|
Console.WriteLine("\"Null FromType\",{0},{1},\"{2}\",{3}", ItemID, MyContent.Type,DisplayNumber,MyItemInfoUnique);
|
|
|
|
|
return _FromType;
|
|
|
|
|
}
|
|
|
|
|
set { _FromType = value; }
|
|
|
|
|
}
|
|
|
|
|
public bool IsFirstCautionPart
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (MyPrevious == null && FromType == E_FromType.Caution);
|
|
|
|
|
return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.Caution));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1148,6 +1221,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (MyPrevious == null && FromType == E_FromType.Note);
|
|
|
|
|
return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.Note));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1156,6 +1231,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.Caution);
|
|
|
|
|
return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Caution));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1163,6 +1240,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.Note);
|
|
|
|
|
return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Note));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1322,20 +1401,29 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
return IsType("ContAcSequential");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private bool? _IsHigh = null;
|
|
|
|
|
public bool IsHigh
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_IsHigh != null) return (bool)_IsHigh;
|
|
|
|
|
int profileDepth = ProfileTimer.Push(">>>> BeginIsHigh");
|
|
|
|
|
|
|
|
|
|
// check to see if ActiveParent is a section, if so it is a high level step
|
|
|
|
|
if (MyContent.Type / 10000 != 2) return false;
|
|
|
|
|
ItemInfo parent = ActiveParent as ItemInfo;
|
|
|
|
|
if (parent == null) return false;
|
|
|
|
|
// IsHigh was returning true if this item is a caution or note off of a section..
|
|
|
|
|
// from the (parent.MyContent.Type / 1000) == 1.
|
|
|
|
|
if (IsCaution || IsNote) return false;
|
|
|
|
|
if ((parent.MyContent.Type / 10000) == 1)
|
|
|
|
|
return true;
|
|
|
|
|
return false;
|
|
|
|
|
if (MyContent.Type / 10000 != 2) _IsHigh = false;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ItemInfo parent = ActiveParent as ItemInfo;
|
|
|
|
|
if (parent == null) _IsHigh = false;
|
|
|
|
|
// IsHigh was returning true if this item is a caution or note off of a section..
|
|
|
|
|
// from the (parent.MyContent.Type / 1000) == 1.
|
|
|
|
|
else if ((parent.MyContent.Type / 10000) != 1)
|
|
|
|
|
_IsHigh = false;
|
|
|
|
|
else if (IsCaution || IsNote) _IsHigh = false;
|
|
|
|
|
else _IsHigh = true;
|
|
|
|
|
}
|
|
|
|
|
ProfileTimer.Pop(profileDepth);
|
|
|
|
|
return (bool)_IsHigh;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public bool IsSequential
|
|
|
|
@@ -1365,6 +1453,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.Table);
|
|
|
|
|
return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.Table));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1372,7 +1462,10 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.RNO));
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.RNO);
|
|
|
|
|
bool retval = ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.RNO));
|
|
|
|
|
return retval;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public bool IsInRNO
|
|
|
|
@@ -1541,6 +1634,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.Procedure);
|
|
|
|
|
return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Procedure));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1548,6 +1643,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.Section);
|
|
|
|
|
return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Section));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1555,6 +1652,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (FromType != null)
|
|
|
|
|
return (FromType == E_FromType.Step);
|
|
|
|
|
return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Step));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -2224,6 +2323,7 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
//if (ItemDocVersionCount > 0) return ItemDocVersions[0]; Need to create one interface to support Folders, DocVersions and Items
|
|
|
|
|
ContentInfo parentContent = ParentContent;
|
|
|
|
|
if (parentContent == null || parentContent.ContentItemCount == 0) return null;
|
|
|
|
|
if (parentContent.ContentItems.Count == 0) return null;
|
|
|
|
|
_MyParent = parentContent.ContentItems[0];
|
|
|
|
|
}
|
|
|
|
|
return _MyParent;
|
|
|
|
@@ -2643,11 +2743,15 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
//if (_ActiveFormat == null) // jsj added check for NULL ActiveParent
|
|
|
|
|
if (_ActiveFormat == null || !PrintAllAtOnce) // jsj added check for NULL ActiveParent
|
|
|
|
|
_ActiveFormat = (LocalFormat != null ? LocalFormat : (ActiveParent != null) ? ActiveParent.ActiveFormat : null);
|
|
|
|
|
//Console.WriteLine("Active {0}", (_ActiveFormat == null) ? "_ActiveFormat is null" : _ActiveFormat.Name);
|
|
|
|
|
return _ActiveFormat;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_ActiveFormat = value;
|
|
|
|
|
}
|
|
|
|
|
//get { return LocalFormat != null ? LocalFormat : ActiveParent.ActiveFormat; }
|
|
|
|
|
}
|
|
|
|
|
public FormatInfo LocalFormat
|
|
|
|
@@ -3236,6 +3340,7 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
|
|
|
|
|
public int GetStepLevel() // ref int bias)
|
|
|
|
|
{
|
|
|
|
|
int profileDepth = ProfileTimer.Push(">>>> GetStepLevel");
|
|
|
|
|
int level = 0;
|
|
|
|
|
ItemInfo par = this;
|
|
|
|
|
ItemInfo LastRNO = null;
|
|
|
|
@@ -3297,6 +3402,7 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
if (MyDocStyle != null && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SkipTwoStepLevels) == E_DocStructStyle.DSS_SkipTwoStepLevels && level == 0)
|
|
|
|
|
level += 2;
|
|
|
|
|
if (level < 0) level = 0;
|
|
|
|
|
ProfileTimer.Pop(profileDepth);
|
|
|
|
|
return level;
|
|
|
|
|
}
|
|
|
|
|
public int CurrentSectionLevel()
|
|
|
|
@@ -3402,15 +3508,16 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
// for calvert alarms, need to check if next item is a different type, if a different type.
|
|
|
|
|
// If it is the same type, clear the header so that the header text isn't printed two times.
|
|
|
|
|
bool specialCalvertAlarm = false;
|
|
|
|
|
ItemInfo nextItem = NextItem;
|
|
|
|
|
if (ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
|
|
|
|
{
|
|
|
|
|
if (GetNextItem() != null && MyContent.Type != GetNextItem().MyContent.Type) specialCalvertAlarm = true;
|
|
|
|
|
if (nextItem != null && MyContent.Type != nextItem.MyContent.Type) specialCalvertAlarm = true;
|
|
|
|
|
}
|
|
|
|
|
if (NextItem != null && !specialCalvertAlarm)
|
|
|
|
|
if (nextItem != null && !specialCalvertAlarm)
|
|
|
|
|
{
|
|
|
|
|
nextStepData = NextItem.FormatStepData;
|
|
|
|
|
nextStepData = nextItem.FormatStepData;
|
|
|
|
|
// tried to duplicate functionality from 16-bit code.
|
|
|
|
|
nextTbFormat = NextItem.IsInRNO ? nextStepData.TabData.RNOIdentPrint : nextStepData.TabData.IdentPrint;
|
|
|
|
|
nextTbFormat = nextItem.IsInRNO ? nextStepData.TabData.RNOIdentPrint : nextStepData.TabData.IdentPrint;
|
|
|
|
|
nextTbFormat = ReplaceStepToken(nextTbFormat);
|
|
|
|
|
}
|
|
|
|
|
// Handle the centered tab - if this tab is centered make it a header.
|
|
|
|
@@ -3423,7 +3530,7 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
// use of the MixCautionsAndNotes format flag - no bullet is used, if more that one replace the tab
|
|
|
|
|
// with a bullet. Also, if only one in group and tab text ends with 'S', remove it:
|
|
|
|
|
bool mixCandN = MixCautionNotesDiffType();
|
|
|
|
|
if ((MyPrevious == null && (NextItem == null||specialCalvertAlarm)) || mixCandN || FormatStepData.SeparateBox)
|
|
|
|
|
if ((MyPrevious == null && (nextItem == null||specialCalvertAlarm)) || mixCandN || FormatStepData.SeparateBox)
|
|
|
|
|
{
|
|
|
|
|
if (_MyHeader.CleanText.ToUpper().EndsWith("S"))
|
|
|
|
|
{
|
|
|
|
@@ -3452,7 +3559,7 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
else
|
|
|
|
|
_MyHeader = null;
|
|
|
|
|
}
|
|
|
|
|
else if (this.NextItem == null)
|
|
|
|
|
else if (nextItem == null)
|
|
|
|
|
tbformat = "";
|
|
|
|
|
}
|
|
|
|
|
if (!this.FormatStepData.SeparateBox)
|
|
|
|
@@ -3483,10 +3590,10 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
else if (FormatStepData.TabData.IsTransition)
|
|
|
|
|
return tbformat;
|
|
|
|
|
// else if this has a next
|
|
|
|
|
else if (tbformat != null && NextItem != null && !FormatStepData.AlwaysTab &&
|
|
|
|
|
else if (tbformat != null && nextItem != null && !FormatStepData.AlwaysTab &&
|
|
|
|
|
(!FormatStepData.MixCautionsAndNotes ||
|
|
|
|
|
(FormatStepData.TabData.UsePreviousStyle && !nextStepData.TabData.UsePreviousStyle && tbformat == nextTbFormat) ||
|
|
|
|
|
((prevTbFormat != tbformat && (NextItem.MyContent.Type == (int)(MyContent.Type % 10000))))))
|
|
|
|
|
((prevTbFormat != tbformat && (nextItem.MyContent.Type == (int)(MyContent.Type % 10000))))))
|
|
|
|
|
{
|
|
|
|
|
tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
|
|
|
|
|
//string bstr = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
|
|
|
|
@@ -3525,12 +3632,12 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
if (ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
|
|
|
|
{
|
|
|
|
|
if (MyPrevious != null && MyContent.Type != MyPrevious.MyContent.Type) return false;
|
|
|
|
|
if (GetNextItem() != null && MyContent.Type != GetNextItem().MyContent.Type) return false;
|
|
|
|
|
if (NextItem != null && MyContent.Type != NextItem.MyContent.Type) return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!FormatStepData.MixCautionsAndNotes) return false;
|
|
|
|
|
if (IsNote && ((GetNextItem() != null && GetNextItem().IsCaution) || (MyPrevious != null && MyPrevious.IsCaution))) return true;
|
|
|
|
|
if (IsCaution && ((GetNextItem() != null && GetNextItem().IsNote) || (MyPrevious != null && MyPrevious.IsNote))) return true;
|
|
|
|
|
if (IsNote && ((NextItem != null && NextItem.IsCaution) || (MyPrevious != null && MyPrevious.IsCaution))) return true;
|
|
|
|
|
if (IsCaution && ((NextItem != null && NextItem.IsNote) || (MyPrevious != null && MyPrevious.IsNote))) return true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -5143,6 +5250,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
tranLookup.NewLookupNeeded += new TransitionLookupEvent(GetNewLookup);
|
|
|
|
|
//ItemInfo.ResetTicks();
|
|
|
|
|
//DateTime dt = DateTime.Now;
|
|
|
|
|
tmp.FromType = E_FromType.Procedure;
|
|
|
|
|
SetFromType(tmp);
|
|
|
|
|
SetParentSectionAndDocVersion(tmp, tmp.MyDocVersion, null, tmp.MyDocVersion, tranLookup);
|
|
|
|
|
//TimeSpan ts = DateTime.Now.Subtract(dt);
|
|
|
|
|
//ticksItems = ts.Ticks - (ticksROUsage + ticksTrans);
|
|
|
|
@@ -5155,7 +5264,6 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ProcedureInfo GetNewLookup(object sender, TransitionLookupEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
ProcedureInfo tmp = DataPortal.Fetch<ProcedureInfo>(new ItemAndChildrenByUnitCriteria(args.ProcID, 0, args.UnitID));
|
|
|
|
@@ -5171,6 +5279,8 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
//{
|
|
|
|
|
tmp.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitID;
|
|
|
|
|
(tmp.MyConfig as ProcedureConfig).SelectedSlave = args.UnitID;
|
|
|
|
|
tmp.FromType = E_FromType.Procedure;
|
|
|
|
|
SetFromType(tmp);
|
|
|
|
|
ItemInfo.SetParentSectionAndDocVersion(tmp, tmp.MyDocVersion, null, tmp, tmp.MyDocVersion);
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
@@ -5313,7 +5423,13 @@ namespace VEPROMS.CSLA.Library
|
|
|
|
|
//AddToCache(tmp);
|
|
|
|
|
if (tmp.ErrorMessage == "No Record Found") tmp = null;
|
|
|
|
|
if (tmp != null)
|
|
|
|
|
{
|
|
|
|
|
int profileDepth = ProfileTimer.Push(">>>> SetParentSectionAndDocVersion");
|
|
|
|
|
tmp.FromType = E_FromType.Procedure;
|
|
|
|
|
SetFromType(tmp);
|
|
|
|
|
SetParentSectionAndDocVersion(tmp, tmp.MyDocVersion, null, tmp, tmp.MyDocVersion);
|
|
|
|
|
ProfileTimer.Pop(profileDepth);
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|