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

@@ -2281,8 +2281,11 @@ namespace VEPROMS
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
cc.Text = cc.Text.Replace(lookfor, replacewith);
bool forceConvertToText = false;
SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig;
forceConvertToText = (sc.SubSection_Edit == "N");
if (TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection != null)
{
SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig;
forceConvertToText = (sc.SubSection_Edit == "N");
}
cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText);
cc.Save();
nd.InnerText = "done";
@@ -2319,8 +2322,11 @@ namespace VEPROMS
else
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
cc.Text = cc.Text.Replace(lookfor, replacewith);
SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig;
forceConvertToText = (sc.SubSection_Edit == "N");
if (TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection != null)
{
SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig;
forceConvertToText = (sc.SubSection_Edit == "N");
}
if (!forceConvertToText) //check to see if external with internal format
{
TransitionInfo tran = TransitionInfo.Get(transitionid);