Fixed logic to use latest DocVersion data when a new Procedure is added as the first procedure. B2012-277
Fixed logic in GetStepLevel to keep from failing on a null value
This commit is contained in:
parent
c5e45bbe3f
commit
7f752dfbd3
@ -268,12 +268,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
using (DocVersion parentItemDV = parentInfoDV.Get())
|
using (DocVersion parentItemDV = parentInfoDV.Get())
|
||||||
{
|
{
|
||||||
ItemInfo firstinfo = parentInfoDV.FirstChild();
|
int? oldItemID = parentItemDV.ItemID;
|
||||||
parentItemDV.MyItem = itm;// First update the parent to point to the new first child
|
parentItemDV.MyItem = itm;// First update the parent to point to the new first child
|
||||||
parentItemDV.Save();
|
parentItemDV.Save();
|
||||||
if (firstinfo != null)
|
if (oldItemID != null)
|
||||||
{
|
{
|
||||||
using (Item firstchild = firstinfo.Get())
|
using (Item firstchild = Item.Get((int)oldItemID))
|
||||||
{
|
{
|
||||||
firstchild.MyPrevious = itm;// Aim the old first child to point to the new first child.
|
firstchild.MyPrevious = itm;// Aim the old first child to point to the new first child.
|
||||||
firstchild.Save();
|
firstchild.Save();
|
||||||
@ -2328,7 +2328,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
par = par.MyParent;
|
par = par.MyParent;
|
||||||
}
|
}
|
||||||
bias = 0;
|
bias = 0;
|
||||||
if (par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}"))
|
if (par.FormatStepData != null && par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}"))
|
||||||
level--;
|
level--;
|
||||||
|
|
||||||
// ImperfectStructure is used so that the sequential numbering for substeps under an RNO is not same
|
// ImperfectStructure is used so that the sequential numbering for substeps under an RNO is not same
|
||||||
|
Loading…
x
Reference in New Issue
Block a user