Added code to handle collection was modified error when copying items

Added code to make F5 and Shift-F5 keystrokes in the editor work identical to the right mouse button context menu of the tree view with regards to copy and paste of items
Added code to assure only items of similar type (eg: procedure, section, high level step, etc) can be copied and pasted at similar locations within a procedure or working draft
This commit is contained in:
Rich
2014-08-28 02:41:23 +00:00
parent 1baf690bc6
commit f9de5305f2
3 changed files with 125 additions and 41 deletions

View File

@@ -465,6 +465,11 @@ namespace VEPROMS.CSLA.Library
}
private bool HandleSqlExceptionOnCopy(Exception ex)
{
if (ex.Message.Contains("Collection was modified;"))
{
_MyLog.WarnFormat(ex.Message);
return true;
}
if (ex.Message.Contains("This step has been deleted"))
{
System.Windows.Forms.MessageBox.Show("The step being pasted has been deleted!", "Cannot Paste Deleted Step"