Added parameter to InsertSiblingBefore to allow us to specify the step/substep type

This commit is contained in:
John Jenko 2014-07-02 14:22:57 +00:00
parent fb1ffa30c3
commit 99a6826772

View File

@ -282,12 +282,16 @@ namespace VEPROMS.CSLA.Library
return InsertSiblingBefore(text, null); return InsertSiblingBefore(text, null);
} }
public ItemInfo InsertSiblingBefore(string text, string number) public ItemInfo InsertSiblingBefore(string text, string number)
{
return InsertSiblingBefore(text, number, null);
}
public ItemInfo InsertSiblingBefore(string text, string number,int? type)
{ {
ItemInfo tmp = null; ItemInfo tmp = null;
if (!IsSection && (FormatStepData.UseSmartTemplate || MyHLS.FormatStepData.UseSmartTemplate || FormatStepData.UseOldTemplate)) if (!IsSection && (FormatStepData.UseSmartTemplate || MyHLS.FormatStepData.UseSmartTemplate || FormatStepData.UseOldTemplate))
tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.Before, (int)MyContent.Type); tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.Before, (int)MyContent.Type);
else else
tmp = NewItemInfoFetch(ItemID, EAddpingPart.Before, number, text, null, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID); tmp = NewItemInfoFetch(ItemID, EAddpingPart.Before, number, text, type, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
// this item is updated in SQL so we have to manually force the iteminfo updates // this item is updated in SQL so we have to manually force the iteminfo updates
// Refresh ItemInfo to update Previous // Refresh ItemInfo to update Previous