B2018-141 Remove duplicate section number from background step tab. B2018-142 – added Null checks so that an un-linked background document can be deleted
This commit is contained in:
parent
7c40e22186
commit
5fb0136cbb
@ -2263,6 +2263,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (sc.MyEnhancedDocuments != null && sc.MyEnhancedDocuments.Count == 1 && sc.MyEnhancedDocuments[0].Type == 0)
|
||||
{
|
||||
SectionInfo siSource = SectionInfo.Get(sc.MyEnhancedDocuments[0].ItemID);
|
||||
if (siSource == null) return true; //B2018-142 null check to allow deletion of unlinked background procedure
|
||||
SectionConfig scs = siSource.MyConfig as SectionConfig;
|
||||
if (scs.Section_LnkEnh == "T") return true;
|
||||
}
|
||||
@ -3886,6 +3887,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
string tb = (LinkedOrdinal==null)? "NA" : LinkedOrdinal.ToString();
|
||||
tbformat = tbformat.Replace("{LNK C/N Num}", tb);
|
||||
if ((ActiveParent as ItemInfo).FormatStepData.TabData.IdentEdit.Contains("{Section Prefix}"))
|
||||
tbformat = tbformat.Replace("{Section Prefix}",""); // B2018-141 remove duplicate section number
|
||||
if ((ActiveParent as ItemInfo).LinkedTab != null)
|
||||
tbformat = tbformat.Replace("{LNK Step Num}", (ActiveParent as ItemInfo).LinkedTab.Trim(" .".ToCharArray())); //(ActiveParent as ItemInfo).Ordinal.ToString());
|
||||
tbformat = tbformat.TrimStart(" ".ToCharArray());
|
||||
@ -7039,6 +7042,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// now get its enhtype from the source:
|
||||
int enhtype = -1;
|
||||
ItemInfo sourceProc = ItemInfo.Get(eds[0].ItemID);
|
||||
if (sourceProc == null) return null; //B2018-142 to allow an un-linked background procedure to be deleted
|
||||
EnhancedDocuments sourceProcEds = sourceProc.GetMyEnhancedDocuments();
|
||||
foreach (EnhancedDocument spe in sourceProcEds)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user