Handle exception if external transition to a procedure.
This commit is contained in:
parent
3ef663d7e3
commit
7e10163760
@ -1367,7 +1367,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (!HandleSqlExceptionOnCopy(ex))
|
if (!HandleSqlExceptionOnCopy(ex))
|
||||||
{
|
{
|
||||||
if (ex.Message.Contains("has External Transitions and has no next step")
|
if (ex.Message.Contains("has External Transitions and has no next step")
|
||||||
|| ex.Message.Contains("has External Transitions to it's children")
|
|| ex.Message.Contains("has External Transitions to Procedure")
|
||||||
|
|| ex.Message.Contains("has External Transitions to it's children")
|
||||||
|| ex.Message.Contains("This step has been deleted")
|
|| ex.Message.Contains("This step has been deleted")
|
||||||
)
|
)
|
||||||
throw ex;
|
throw ex;
|
||||||
|
@ -793,6 +793,24 @@ namespace Volian.Controls.Library
|
|||||||
SetFocus();
|
SetFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (ex.Message.Contains("has External Transitions to Procedure"))
|
||||||
|
{
|
||||||
|
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitions(MyID))
|
||||||
|
{
|
||||||
|
DialogResult ans = MessageBox.Show("Transitions exist to this procedure." +
|
||||||
|
"\r\n\r\nDo you want to be placed on the " + (exTrans.Count > 1 ? "first " : "") + "substep with the problem Transition?" +
|
||||||
|
"\r\n\r\nSubsteps with Problem Transitions" +
|
||||||
|
exTrans.Summarize(),
|
||||||
|
"Cannot Delete This Procedure", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
|
if (ans == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(exTrans[0].MyContent.ContentItems[0]);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SetFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (ex.Message.Contains("has External Transitions to it's children"))
|
else if (ex.Message.Contains("has External Transitions to it's children"))
|
||||||
{
|
{
|
||||||
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(MyID))
|
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(MyID))
|
||||||
|
@ -2271,6 +2271,21 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (ex.Message.Contains("has External Transitions to Procedure"))
|
||||||
|
{
|
||||||
|
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitions(ii.ItemID))
|
||||||
|
{
|
||||||
|
DialogResult ans = MessageBox.Show("Transitions exist to this procedure and cannot be adjusted automatically." +
|
||||||
|
"\r\n\r\nDo you want to be placed on the " + (exTrans.Count > 1 ? "first " : "") + "substep with the problem Transition?" +
|
||||||
|
"\r\n\r\nSubsteps with Problem Transitions" +
|
||||||
|
exTrans.Summarize(),
|
||||||
|
"Cannot Delete This Procedure", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
|
if (ans == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
OnOpenItem(this, new vlnTreeItemInfoEventArgs(exTrans[0].MyContent.ContentItems[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (ex.Message.Contains("has External Transitions to it's children"))
|
else if (ex.Message.Contains("has External Transitions to it's children"))
|
||||||
{
|
{
|
||||||
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(ii.ItemID))
|
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(ii.ItemID))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user