public ActionResult DiagramUpdate(MVCxDiagramNodeUpdateValues <DiagramBindToList.Models.Node, int> nodeUpdateValues, MVCxDiagramEdgeUpdateValues <DiagramBindToList.Models.Edge, int> edgeUpdateValues)
 {
     foreach (var item in nodeUpdateValues.Update)
     {
         WorkflowDataProvider.UpdateObject(item);
     }
     foreach (var itemKey in nodeUpdateValues.DeleteKeys)
     {
         WorkflowDataProvider.DeleteObject(itemKey);
     }
     foreach (var item in nodeUpdateValues.Insert)
     {
         var key = WorkflowDataProvider.InsertObject(item);
         nodeUpdateValues.MapInsertedItemKey(item, key);
     }
     foreach (var item in edgeUpdateValues.Update)
     {
         WorkflowDataProvider.UpdateConnection(item);
     }
     foreach (var itemKey in edgeUpdateValues.DeleteKeys)
     {
         WorkflowDataProvider.DeleteConnection(itemKey);
     }
     foreach (var item in edgeUpdateValues.Insert)
     {
         var key = WorkflowDataProvider.InsertConnection(item);
         edgeUpdateValues.MapInsertedItemKey(item, key);
     }
     return(DiagramExtension.GetBatchUpdateResult(nodeUpdateValues, edgeUpdateValues));
 }
Exemple #2
0
 public ActionResult LinearUpdate(MVCxDiagramNodeUpdateValues <Department, int> nodeUpdateValues)
 {
     foreach (var item in nodeUpdateValues.Update)
     {
         DepartmentProvider.Update(item);
     }
     foreach (var itemKey in nodeUpdateValues.DeleteKeys)
     {
         DepartmentProvider.Delete(itemKey);
     }
     foreach (var item in nodeUpdateValues.Insert)
     {
         var insertedItem = DepartmentProvider.Insert(item);
         nodeUpdateValues.MapInsertedItemKey(item, insertedItem.ID);
     }
     return(DiagramExtension.GetBatchUpdateResult(nodeUpdateValues));
 }
        public ActionResult DiagramUpdate(MVCxDiagramNodeUpdateValues <Item, int> nodeUpdateValues)
        {
            foreach (var item in nodeUpdateValues.Update)
            {
                DiagramDataProvider.UpdateItem(item);
            }
            foreach (var itemKey in nodeUpdateValues.DeleteKeys)
            {
                DiagramDataProvider.DeleteItem(itemKey);
            }
            foreach (var item in nodeUpdateValues.Insert)
            {
                var key = DiagramDataProvider.InsertItem(item);
                nodeUpdateValues.MapInsertedItemKey(item, key);
            }

            return(DiagramExtension.GetBatchUpdateResult(nodeUpdateValues));
        }