check for null reference when deleting a source step that has associated enhanced (found during fix for B2016-228)
B2016-228: when creating section/procedure enhanced items, set ‘Number’ B2016-228: when modifying source section or procedure, save ‘Number’ also B2016-198: User hold point no longer overwrites the ‘INIT/DATE’ signoff heading
This commit is contained in:
@@ -1527,7 +1527,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (exEnh.IsStep)
|
||||
newEnh = exEnh.InsertEnhancedSteps(MyContent.Text, null, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
else
|
||||
newEnh = exEnh.InsertEnhancedItems(MyContent.Text, null, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
newEnh = exEnh.InsertEnhancedItems(MyContent.Text, MyContent.Number, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
}
|
||||
}
|
||||
iiCur = iiCur.MyPrevious;
|
||||
@@ -1546,7 +1546,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (exEnh.IsStep)
|
||||
newEnh = exEnh.InsertEnhancedSteps(MyContent.Text, null, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
else
|
||||
newEnh = exEnh.InsertEnhancedItems(MyContent.Text, null, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
newEnh = exEnh.InsertEnhancedItems(MyContent.Text, MyContent.Number, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
}
|
||||
}
|
||||
iiNxt = iiNxt.GetNextItem();
|
||||
@@ -1567,7 +1567,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
// get the enhaced docversioninfo:
|
||||
DocVersionInfo enhDVInfo = DocVersionInfo.Get(ded.VersionID);
|
||||
using (Procedure newenhProcedure = Procedure.MakeProcedure(enhDVInfo, enhDVInfo.Procedures.Count != 0 ? enhDVInfo.Procedures[enhDVInfo.Procedures.Count - 1] : null, null, "New Procedure", 0))
|
||||
using (Procedure newenhProcedure = Procedure.MakeProcedure(enhDVInfo, enhDVInfo.Procedures.Count != 0 ? enhDVInfo.Procedures[enhDVInfo.Procedures.Count - 1] :null, MyContent.Number, "New Procedure", 0))
|
||||
{
|
||||
newEnh = ItemInfo.Get(newenhProcedure.ItemID);
|
||||
string scng = null;
|
||||
@@ -1596,7 +1596,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (exEnh.IsStep)
|
||||
newEnh = exEnh.InsertEnhancedSteps(MyContent.Text, null, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
else
|
||||
newEnh = exEnh.InsertEnhancedItems(MyContent.Text, null, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
newEnh = exEnh.InsertEnhancedItems(MyContent.Text, MyContent.Number, addtype, MyContent.Type, edSource.Type, this.ItemID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user