Added code to handle a transition where the item the transition is going to does not have an active section

Added code to handle the condition where no email address has been defined for a user.
This commit is contained in:
Rich
2015-02-19 17:43:23 +00:00
parent cbc3df3023
commit 7ff6a6a80e
4 changed files with 59 additions and 34 deletions

View File

@@ -599,8 +599,11 @@ namespace VEPROMS.CSLA.Library
//}
if (!forceConvertToText)
{
SectionConfig sc = traninfo.MyItemToID.ActiveSection.MyConfig as SectionConfig;
forceConvertToText = (sc.SubSection_Edit == "N");
if (traninfo.MyItemToID.ActiveSection != null)
{
SectionConfig sc = traninfo.MyItemToID.ActiveSection.MyConfig as SectionConfig;
forceConvertToText = (sc.SubSection_Edit == "N");
}
if (forceConvertToText)
{
TranFixCount++;

View File

@@ -681,9 +681,12 @@ namespace VEPROMS.CSLA.Library
if (oldContent == null) oldContent = content;
//check to see if noneditable
bool forceConvertToText = false;
SectionConfig sc = tran.MyItemToID.ActiveSection.MyConfig as SectionConfig;
//SectionConfig sc = new SectionConfig(tran.MyItemToID.ActiveSection.MyConfig.ToString());
forceConvertToText = (sc.SubSection_Edit == "N");
if (tran.MyItemToID.ActiveSection != null)
{
SectionConfig sc = tran.MyItemToID.ActiveSection.MyConfig as SectionConfig;
//SectionConfig sc = new SectionConfig(tran.MyItemToID.ActiveSection.MyConfig.ToString());
forceConvertToText = (sc.SubSection_Edit == "N");
}
if (!forceConvertToText) //check to see if external with internal format
{
if (tran.MyContent.ContentItems[0].MyProcedure.ItemID != tran.MyItemToID.MyProcedure.ItemID)
@@ -727,9 +730,12 @@ namespace VEPROMS.CSLA.Library
{
//check to see if noneditable
bool forceConvertToText = false;
SectionConfig sc = tran.MyItemToID.ActiveSection.MyConfig as SectionConfig;
//SectionConfig sc = new SectionConfig(tran.MyItemToID.ActiveSection.MyConfig.ToString());
forceConvertToText = (sc.SubSection_Edit == "N");
if (tran.MyItemToID.ActiveSection != null)
{
SectionConfig sc = tran.MyItemToID.ActiveSection.MyConfig as SectionConfig;
//SectionConfig sc = new SectionConfig(tran.MyItemToID.ActiveSection.MyConfig.ToString());
forceConvertToText = (sc.SubSection_Edit == "N");
}
if (!forceConvertToText) //check to see if external with internal format
{
if (tran.MyContent.ContentItems[0].MyProcedure.ItemID != tran.MyItemToID.MyProcedure.ItemID)