New Enhanced Document Properties
Fixed Find and Replace logic to keep it from getting into an infinite loop Used new CSLA code to hanndle deletion of procedures with external transitions New Enhanced Document properties
This commit is contained in:
@@ -1777,6 +1777,7 @@ namespace Volian.Controls.Library
|
||||
// first, check if a changeid is required.
|
||||
string chgId = OnGetChangeId(this, new vlnTreeItemInfoEventArgs(ii));
|
||||
ItemInfo replItemInfo = Item.PasteReplace(ii, copyStartID, chgId);
|
||||
if(replItemInfo != null) OnOpenItem(this,new vlnTreeItemInfoEventArgs(replItemInfo));
|
||||
}
|
||||
SelectedNode = (VETreeNode)((prevtn != null) ? prevtn.NextNode : partn.FirstNode);
|
||||
}
|
||||
@@ -2340,7 +2341,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
OnProcessing(false,"Delete Failed");
|
||||
OnProcessingComplete(dtStart,"Delete Failed");
|
||||
HandleSqlExceptionOnDelete(ex, ii);
|
||||
ItemInfo iii = ii.HandleSqlExceptionOnDelete(ex);
|
||||
if(iii != null) OnOpenItem(this, new vlnTreeItemInfoEventArgs(iii));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2356,56 +2358,6 @@ namespace Volian.Controls.Library
|
||||
if (Processing != null)
|
||||
Processing(this, new vlnTreeStatusEventArgs(status,message));
|
||||
}
|
||||
private void HandleSqlExceptionOnDelete(System.Data.SqlClient.SqlException ex, ItemInfo ii)
|
||||
{
|
||||
if (ex.Message.Contains("has External Transitions and has no next step"))
|
||||
{
|
||||
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(ii.ItemID))
|
||||
{
|
||||
DialogResult ans = MessageBox.Show("Transitions exist to this step 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 Step", 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 Procedure"))
|
||||
{
|
||||
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(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"))
|
||||
{
|
||||
using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(ii.ItemID))
|
||||
{
|
||||
DialogResult ans = MessageBox.Show("Transitions exist to substeps of this step 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 Step", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
if (ans == DialogResult.Yes)
|
||||
{
|
||||
OnOpenItem(this, new vlnTreeItemInfoEventArgs(exTrans[0].MyContent.ContentItems[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
MessageBox.Show(ex.Message, "SQL Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
#endregion
|
||||
#region SetLastValuesAndSaveIfChangedStuff
|
||||
private void SetLastValues(VETreeNode node)
|
||||
|
Reference in New Issue
Block a user