} // getPercentDone() /// <summary> /// Create a new batch operation to handle recalcution of inventory levels /// </summary> public CswNbtObjClassBatchOp makeBatchOp(CswPrimaryKey PrevLocation, CswPrimaryKey CurrentLocation) { CswNbtObjClassBatchOp BatchNode = null; InventoryLevelsBatchData BatchData = new InventoryLevelsBatchData(PrevLocation, CurrentLocation); BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData); return(BatchNode); } // makeBatchOp()
/// <summary> /// Create a new batch operation to handle creation of Containers from the receiving wizard /// </summary> public CswNbtObjClassBatchOp makeBatchOp(CswNbtReceivingDefinition ReceiptDefinition) { CswNbtObjClassBatchOp BatchNode = null; ReceivingBatchData BatchData = new ReceivingBatchData(ReceiptDefinition); BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); return(BatchNode); } // makeBatchOp()
/// <summary> /// Create a new batch operation to handle results of the BulkEdit action /// </summary> public CswNbtObjClassBatchOp makeBatchOp(DataTable excelData) { BulkEditBatchData batchData = new BulkEditBatchData(string.Empty); batchData.excelData = excelData; batchData.CurrentRow = 0; return(CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, batchData.ToString())); } // makeBatchOp()
/// <summary> /// Create a new batch operation to handle a deleteNodes/multi edit operation /// </summary> /// <param name="DeleteNodeIds"></param> public CswNbtObjClassBatchOp makeBatchOp(Collection <CswPrimaryKey> DeleteNodeIds) { CswNbtObjClassBatchOp BatchNode = null; MultiDeleteBatchData BatchData = new MultiDeleteBatchData(string.Empty); BatchData.DeleteNodeIds = _pkArrayToJArray(DeleteNodeIds); BatchData.StartingCount = DeleteNodeIds.Count(); BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); return(BatchNode); }
} // makeBatchOp() /// <summary> /// Create a new batch operation to handle future node generation /// </summary> /// <param name="GenNode">Generator Node</param> /// <param name="FinalDate"></param> public CswNbtObjClassBatchOp makeBatchOp(CswNbtNode GenNode, DateTime FinalDate) { CswNbtObjClassBatchOp BatchNode = null; if (null != GenNode) { CswNbtObjClassGenerator GeneratorNode = (CswNbtObjClassGenerator)GenNode; // BZ 6752 - The first future node is the first node generated // after today + warning days, according to the time interval // But it has to include initial due date, no matter what the time interval. CswNbtNodePropTimeInterval NextDueDateTimeInterval = GeneratorNode.DueDateInterval; Double WarningDays = 0; if (GeneratorNode.WarningDays.Value > 0) { WarningDays = GeneratorNode.WarningDays.Value; } DateTime StartDate = DateTime.Now.AddDays(WarningDays).Date; //bz# 6937 (capture date only, not time) DateTime DateOfNextOccurance = DateTime.MinValue; if (GeneratorNode.DueDateInterval.getStartDate().Date >= StartDate) //bz # 6937 (change gt to gteq) { DateOfNextOccurance = GeneratorNode.DueDateInterval.getStartDate().Date; } else { DateOfNextOccurance = NextDueDateTimeInterval.getNextOccuranceAfter(StartDate); } // Determine number of iterations Int32 StartingCount = 0; DateTime ThisDate = DateOfNextOccurance; while (ThisDate != DateTime.MinValue && ThisDate.Date <= FinalDate && (GeneratorNode.FinalDueDate.Empty || ThisDate.Date <= GeneratorNode.FinalDueDate.DateTimeValue.Date)) { StartingCount++; ThisDate = GeneratorNode.DueDateInterval.getNextOccuranceAfter(ThisDate); } FutureNodesBatchData BatchData = new FutureNodesBatchData(string.Empty); BatchData.GeneratorNodeId = GenNode.NodeId; BatchData.NextStartDate = DateOfNextOccurance; BatchData.FinalDate = FinalDate; BatchData.StartingCount = StartingCount; BatchData.IterationCount = 0; BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); } // if(null != GeneratorNode) return(BatchNode); } // makeBatchOp()
/// <summary> /// Create a new batch operation to handle clicking an objectclass button for multiple nodes /// </summary> /// <param name="MultiNodeIds">NodeIds with which ObjectClassButtonClick logic should be applied</param> /// <param name="NodeTypePropId">PropId of the ObjectClassButton</param> public CswNbtObjClassBatchOp makeBatchOp(Collection <CswPrimaryKey> MultiNodeIds, Int32 NodeTypePropId) { MultiButtonClickBatchData BatchData = new MultiButtonClickBatchData(string.Empty); BatchData.MultiNodeIds = _pkArrayToJArray(MultiNodeIds); BatchData.StartingCount = MultiNodeIds.Count(); BatchData.NodeTypePropId = NodeTypePropId; CswNbtObjClassBatchOp BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); return(BatchNode); }
/// <summary> /// Create a new batch operation to handle an edit of the location property /// based on the location property of another node. /// </summary> /// <param name="NodePks"></param> /// <param name="CGLocationId"></param> /// <returns></returns> public CswNbtObjClassBatchOp makeBatchOp(IEnumerable <CswPrimaryKey> NodePks, CswPrimaryKey LocationId) { CswNbtObjClassBatchOp BatchNode = null; SyncLocationBatchData BatchData = new SyncLocationBatchData(string.Empty); BatchData.LocationId = LocationId; BatchData.StartingCount = NodePks.Count(); BatchData.NodePks = _pkArrayToJArray(NodePks); BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); return(BatchNode); } // makeBatchOp()
public CswNbtObjClassBatchOp makeBatchOp(CswNbtCISProNbtMobileData.MobileRequest MobileRequest) { CswNbtObjClassBatchOp BatchNode = null; MobileMultiOpUpdatesBatchData BatchData = new MobileMultiOpUpdatesBatchData(string.Empty); BatchData.StartingCount = MobileRequest.data.MultiOpRows.Count; BatchData.Operations = _operationsCollectionToJArray(MobileRequest.data.MultiOpRows); BatchData.Username = MobileRequest.data.username; BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); return(BatchNode); } // makeBatchOp()
/// <summary> /// Create a new batch operation to handle a copyNodeProps/multi edit operation /// </summary> /// <param name="SourceNode"></param> /// <param name="CopyNodeIds"></param> /// <param name="NodeTypePropIds"></param> public CswNbtObjClassBatchOp makeBatchOp(CswNbtNode SourceNode, Collection <CswPrimaryKey> CopyNodeIds, Collection <Int32> NodeTypePropIds) { CswNbtObjClassBatchOp BatchNode = null; if (null != SourceNode) { MultiEditBatchData BatchData = new MultiEditBatchData(string.Empty); BatchData.SourceNodeId = SourceNode.NodeId; BatchData.CopyNodeIds = pkArrayToJArray(CopyNodeIds); BatchData.StartingCount = CopyNodeIds.Count(); BatchData.NodeTypePropIds = Int32CollectionToJArray(NodeTypePropIds); BatchNode = CswNbtBatchManager.makeNew(_CswNbtResources, _BatchOpName, BatchData.ToString()); } // if(null != SourceNode) return(BatchNode); } // makeBatchOp()