Exemplo n.º 1
0
 void ISDETableEditor.StartEditing(esriMultiuserEditSessionMode editSessionMode)
 {
     if (multiWspEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMVersioned))
     {
         if (_workspaceEdit.IsBeingEdited())
         {
             //MessageBox.Show("line 313 SdeTable, edited");
             _workspaceEdit.StopEditOperation();
             _workspaceEdit.StopEditing(false);
         }
         multiWspEdit.StartMultiuserEditing(editSessionMode);
     }
     else
     {
         _workspaceEdit.StartEditing(true);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Encapsulates the <paramref name="operation" /> by the necessary start and stop edit constructs using the specified
 ///     <paramref name="withUndoRedo" /> and
 ///     <paramref name="multiuserEditSessionMode" /> parameters.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="withUndoRedo">if set to <c>true</c> when the changes are reverted when the edits are aborted.</param>
 /// <param name="multiuserEditSessionMode">
 ///     The edit session mode that can be used to indicate non-versioned or versioned
 ///     editing for workspaces that support multiuser editing.
 /// </param>
 /// <param name="operation">
 ///     The edit operation delegate that handles making the necessary edits. When the delegate returns
 ///     <c>true</c> the edits will be saved; otherwise they will not be saved.
 /// </param>
 /// <returns>
 ///     Returns a <see cref="bool" /> representing the state of the operation.
 /// </returns>
 /// <exception cref="System.ArgumentNullException">action</exception>
 /// <exception cref="System.ArgumentException">
 ///     The workspace does not support the edit session
 ///     mode.;multiuserEditSessionMode
 /// </exception>
 public static bool PerformOperation(this IVersion source, bool withUndoRedo, esriMultiuserEditSessionMode multiuserEditSessionMode, Func <bool> operation)
 {
     return(((IWorkspace)source).PerformOperation(withUndoRedo, multiuserEditSessionMode, operation, error => false));
 }