public IResult <ICreateLotDefectReturn> CreateLotDefect(ICreateLotDefectParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParameters = parameters.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters.ConvertTo <ICreateLotDefectReturn>()); } var createDefectResult = new CreateInHouseContaminationDefectCommand(_lotUnitOfWork).Execute(parsedParameters.ResultingObject, _timeStamper.CurrentTimeStamp); if (!createDefectResult.Success) { return(createDefectResult.ConvertTo <ICreateLotDefectReturn>()); } _lotUnitOfWork.Commit(); var synchronizeLotParameters = new SynchronizeLotParameters { LotKey = parsedParameters.ResultingObject.LotKey, OverrideOldContextLotAsCompleted = false }; return(SyncParameters.Using(new SuccessResult <ICreateLotDefectReturn>( new CreateLotDefectReturn(createDefectResult.ResultingObject.ToLotDefectKey(), synchronizeLotParameters)), synchronizeLotParameters)); }
public IResult <string> CreateProductionBatchResults(ICreateProductionBatchResultsParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parametersResult = parameters.ToParsedParameters(); if (!parametersResult.Success) { return(parametersResult.ConvertTo <string>()); } var createResult = new ProductionBatchResultsConductor(_productionUnitOfWork).Create(_timeStamper.CurrentTimeStamp, parametersResult.ResultingObject); if (!createResult.Success) { return(createResult.ConvertTo <string>()); } _productionUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult <string>(parametersResult.ResultingObject.LotKey), parametersResult.ResultingObject.LotKey)); }
public IResult UpdateInventoryTreatmentOrder(IUpdateTreatmentOrderParameters parameters) { var parsedParameters = new UpdateTreatmentOrderConductorParameters <IUpdateTreatmentOrderParameters>(parameters); if (!parsedParameters.Result.Success) { return(parsedParameters.Result.ConvertTo <InventoryShipmentOrderKey>()); } var updateResult = new UpdateTreatmentOrderConductor(_inventoryShipmentOrderUnitOfWork).Update(_timeStamper.CurrentTimeStamp, parsedParameters); if (!updateResult.Success) { return(updateResult.ConvertTo <InventoryShipmentOrderKey>()); } _inventoryShipmentOrderUnitOfWork.Commit(); var key = updateResult.ResultingObject.ToInventoryShipmentOrderKey(); return(SyncParameters.Using(new SuccessResult <string>(key), new SyncInventoryShipmentOrderParameters { InventoryShipmentOrderKey = key, New = false })); }
public IResult SetPickedInventoryForSalesOrder(string salesOrderKey, ISetPickedInventoryParameters pickedInventory) { if (salesOrderKey == null) { throw new ArgumentNullException("salesOrderKey"); } if (pickedInventory == null) { throw new ArgumentNullException("pickedInventory"); } var orderKeyResult = KeyParserHelper.ParseResult <ISalesOrderKey>(salesOrderKey); if (!orderKeyResult.Success) { return(orderKeyResult); } var pickInventoryResult = new SetSalesOrderPickedInventoryConductor(_inventoryShipmentOrderUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, orderKeyResult.ResultingObject, pickedInventory); if (!pickInventoryResult.Success) { return(pickInventoryResult); } _inventoryShipmentOrderUnitOfWork.Commit(); var key = pickInventoryResult.ResultingObject.ToSalesOrderKey(); return(SyncParameters.Using(new SuccessResult(), new SyncSalesOrderParameters { SalesOrderKey = key, New = false })); }
public IResult <string> SetSalesQuote(ISalesQuoteParameters parameters, bool updateExisting) { var parsedParameters = parameters.ToParsedParameters(updateExisting); if (!parsedParameters.Success) { return(parsedParameters.ConvertTo <string>()); } var result = new SetSalesQuoteConductor(_inventoryShipmentOrderUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parsedParameters.ResultingObject); if (!result.Success) { return(result.ConvertTo <string>()); } _inventoryShipmentOrderUnitOfWork.Commit(); var salesQuoteKey = result.ResultingObject.ToSalesQuoteKey(); return(SyncParameters.Using(new SuccessResult <string>(salesQuoteKey), new SyncSalesQuoteParameters { SalesQuoteKey = salesQuoteKey, New = !updateExisting })); }
public IResult <INoteReturn> AddNote(string notebookKey, ICreateNoteParameters parameters) { if (notebookKey == null) { throw new ArgumentNullException("notebookKey"); } var keyResult = KeyParserHelper.ParseResult <INotebookKey>(notebookKey); if (!keyResult.Success) { return(keyResult.ConvertTo <INoteReturn>()); } var key = new NotebookKey(keyResult.ResultingObject); var createNoteResult = new CreateNoteCommand(_notebookUnitOfWork).Execute(key, _timeStamper.CurrentTimeStamp, parameters); if (!createNoteResult.Success) { return(createNoteResult.ConvertTo <INoteReturn>()); } _notebookUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult <INoteReturn>(new[] { createNoteResult.ResultingObject }.Select(NoteProjectors.Select().Compile()).FirstOrDefault()), key)); }
public IResult <string> CreateSalesOrder(ICreateSalesOrderParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParametersResult = parameters.ToParsedParameters(); if (!parsedParametersResult.Success) { return(parsedParametersResult.ConvertTo <string>()); } var conductorResult = new CreateSalesOrderConductor(_inventoryShipmentOrderUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parsedParametersResult.ResultingObject); if (!conductorResult.Success) { return(conductorResult.ConvertTo <string>()); } _inventoryShipmentOrderUnitOfWork.Commit(); var salesOrderKey = conductorResult.ResultingObject.ToSalesOrderKey(); return(SyncParameters.Using(new SuccessResult <string>(salesOrderKey), new SyncSalesOrderParameters { SalesOrderKey = salesOrderKey, New = true })); }
public IResult PickInventoryForProductionBatch(string productionBatchKey, ISetPickedInventoryParameters pickedInventory) { if (productionBatchKey == null) { throw new ArgumentNullException("productionBatchKey"); } if (pickedInventory == null) { throw new ArgumentNullException("pickedInventory"); } var productionBatchKeyResult = KeyParserHelper.ParseResult <ILotKey>(productionBatchKey); if (!productionBatchKeyResult.Success) { return(productionBatchKeyResult); } var lotKey = productionBatchKeyResult.ResultingObject.ToLotKey(); var result = new ProductionBatchPickInventoryConductor(_productionUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, pickedInventory, lotKey); if (!result.Success) { return(result); } _productionUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), lotKey)); }
public IResult DeleteProductionSchedule(string productionScheduleKey) { var keyResult = KeyParserHelper.ParseResult <IProductionScheduleKey>(productionScheduleKey); if (!keyResult.Success) { return(keyResult); } var scheduleKey = keyResult.ResultingObject.ToProductionScheduleKey(); var productionSchedule = _productionUnitOfWork.ProductionScheduleRepository.FindByKey(scheduleKey, p => p.ProductionLineLocation, p => p.ScheduledItems); if (productionSchedule == null) { return(new NoWorkRequiredResult()); } foreach (var item in productionSchedule.ScheduledItems.ToList()) { _productionUnitOfWork.ProductionScheduleItemRepository.Remove(item); } _productionUnitOfWork.ProductionScheduleRepository.Remove(productionSchedule); _productionUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), scheduleKey)); }
public IResult <ICreateProductionBatchReturn> CreateProductionBatch(ICreateProductionBatchParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parametersResult = parameters.ToParsedParameters(); if (!parametersResult.Success) { return(parametersResult.ConvertTo <ICreateProductionBatchReturn>()); } var result = new CreateProductionBatchCommand(_productionUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parametersResult.ResultingObject); if (!result.Success) { return(result.ConvertTo <ICreateProductionBatchReturn>()); } _productionUnitOfWork.Commit(); var lotKey = result.ResultingObject.ToLotKey(); return(SyncParameters.Using(new SuccessResult <ICreateProductionBatchReturn>(new CreateProductionBatchReturn { ProductionBatchKey = lotKey, InstructionNotebookKey = result.ResultingObject.InstructionNotebook.ToNotebookKey() }), lotKey)); }
public IResult RemoveProductionBatch(string productionBatchKey) { if (productionBatchKey == null) { throw new ArgumentNullException("productionBatchKey"); } var productionBatchKeyResult = KeyParserHelper.ParseResult <ILotKey>(productionBatchKey); if (!productionBatchKeyResult.Success) { return(productionBatchKeyResult); } var parsedProductionBatchKey = productionBatchKeyResult.ResultingObject; var lotKey = parsedProductionBatchKey.ToLotKey(); var removeResult = new RemoveProductionBatchConductor(_productionUnitOfWork).Execute(lotKey); if (!removeResult.Success) { return(removeResult); } _productionUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), lotKey)); }
public IResult RemovePackSchedule(IRemovePackScheduleParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var packScheduleKeyResult = KeyParserHelper.ParseResult <IPackScheduleKey>(parameters.PackScheduleKey); if (!packScheduleKeyResult.Success) { return(packScheduleKeyResult.ConvertTo <DateTime?>()); } DateTime?packSchId; var result = new RemovePackScheduleConductor(_productionUnitOfWork).Execute(new PackScheduleKey(packScheduleKeyResult.ResultingObject), parameters.UserToken, out packSchId); if (!result.Success) { return(result.ConvertTo <DateTime?>()); } _productionUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), packSchId)); }
public IResult RemoveLotAllowance(ILotAllowanceParameters parameters) { var parsedParameters = parameters.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters); } var result = new LotAllowancesCommand(_lotUnitOfWork).Execute(parsedParameters.ResultingObject, false); if (!result.Success) { return(result); } if (result.State != ResultState.NoWorkRequired) { _lotUnitOfWork.Commit(); } return(SyncParameters.Using(new SuccessResult(), new SynchronizeLotParameters { LotKey = parsedParameters.ResultingObject.LotKey, UpdateSerializationOnly = true })); }
public IResult <ILotStatInfoReturn> SetLotQualityStatus(ISetLotStatusParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParameters = parameters.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters.ConvertTo <ILotStatInfoReturn>()); } var result = new SetLotStatusConductor(_lotUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parsedParameters.ResultingObject); if (!result.Success) { return(result.ConvertTo <ILotStatInfoReturn>()); } _lotUnitOfWork.Commit(); var synchronizeLotParameters = new SynchronizeLotParameters { LotKey = parsedParameters.ResultingObject.LotKey, OverrideOldContextLotAsCompleted = false }; return(SyncParameters.Using(new SuccessResult <ILotStatInfoReturn>(new LotStatInfoReturn(synchronizeLotParameters)), synchronizeLotParameters)); }
public IResult UpdateNote(string noteKey, IUpdateNoteParameters parameters) { if (noteKey == null) { throw new ArgumentNullException("noteKey"); } if (parameters == null) { throw new ArgumentNullException("parameters"); } var keyResult = KeyParserHelper.ParseResult <INoteKey>(noteKey); if (!keyResult.Success) { return(keyResult); } var parsedNoteKey = new NoteKey(keyResult.ResultingObject); var updateNoteResult = new UpdateNoteCommand(_notebookUnitOfWork).Execute(parsedNoteKey, _timeStamper.CurrentTimeStamp, parameters); if (!updateNoteResult.Success) { return(updateNoteResult); } _notebookUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), new NotebookKey(parsedNoteKey))); }
public IResult <string> UpdatePackSchedule(IUpdatePackScheduleParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parametersResult = parameters.ToParsedParameters(); if (!parametersResult.Success) { return(parametersResult.ConvertTo <string>()); } var result = new UpdatePackScheduleCommand(_productionUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parametersResult.ResultingObject); if (!result.Success) { return(result.ConvertTo <string>()); } _productionUnitOfWork.Commit(); var packScheduleKey = result.ResultingObject.ToPackScheduleKey(); return(SyncParameters.Using(new SuccessResult <string>(packScheduleKey), packScheduleKey)); }
public IResult DeleteNote(string noteKey) { if (noteKey == null) { throw new ArgumentNullException("noteKey"); } var keyResult = KeyParserHelper.ParseResult <INoteKey>(noteKey); if (!keyResult.Success) { return(keyResult); } var key = new NoteKey(keyResult.ResultingObject); var note = _notebookUnitOfWork.NoteRepository.FindByKey(key); if (note == null) { return(new InvalidResult(string.Format(UserMessages.NoteNotFound, noteKey))); } _notebookUnitOfWork.NoteRepository.Remove(note); _notebookUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), new NotebookKey(key))); }
public IResult <string> CreateInventoryAdjustment(ICreateInventoryAdjustmentParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parseResult = parameters.ToParsedParameters(); if (!parseResult.Success) { return(parseResult.ConvertTo <string>()); } var createResult = new CreateInventoryAdjustmentConductor(_inventoryUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parseResult.ResultingObject); if (!createResult.Success) { return(createResult.ConvertTo <string>()); } _inventoryUnitOfWork.Commit(); var key = new InventoryAdjustmentKey(createResult.ResultingObject); return(SyncParameters.Using(new SuccessResult <string>(key), key)); }
public IResult <string> UpdateCustomerContract(IUpdateCustomerContractParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParametersResult = parameters.ToParsedParameters(); if (!parsedParametersResult.Success) { return(parsedParametersResult.ConvertTo <string>()); } var commandResult = new UpdateCustomerContractConductor(_inventoryShipmentOrderUnitOfWork).Execute(parsedParametersResult.ResultingObject, _timeStamper.CurrentTimeStamp); if (!commandResult.Success) { return(commandResult.ConvertTo <string>()); } _inventoryShipmentOrderUnitOfWork.Commit(); var contractKey = commandResult.ResultingObject.ToContractKey(); return(SyncParameters.Using(new SuccessResult <string>(contractKey), new SyncCustomerContractParameters { ContractKey = contractKey, New = false })); }
public IResult UpdateIntraWarehouseOrder(IUpdateIntraWarehouseOrderParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var keyResult = KeyParserHelper.ParseResult <IIntraWarehouseOrderKey>(parameters.IntraWarehouseOrderKey); if (!keyResult.Success) { return(keyResult); } var updateResult = new IntraWarehouseOrderConductor(_intraWarehouseOrderUnitOfWork).Update(_timeStamper.CurrentTimeStamp, keyResult.ResultingObject, parameters); if (!updateResult.Success) { return(updateResult); } _intraWarehouseOrderUnitOfWork.Commit(); var key = keyResult.ResultingObject.ToIntraWarehouseOrderKey(); return(SyncParameters.Using(new SuccessResult <string>(key), key)); }
public IResult UpdateSalesOrder(IUpdateSalesOrderParameters parameters) { var parsedParametersResult = parameters.ToParsedParameters(); if (!parsedParametersResult.Success) { return(parsedParametersResult); } var updateResult = new UpdateSalesOrderConductor(_inventoryShipmentOrderUnitOfWork).Execute(_timeStamper.CurrentTimeStamp, parsedParametersResult.ResultingObject); if (!updateResult.Success) { return(updateResult); } _inventoryShipmentOrderUnitOfWork.Commit(); var salesOrderKey = updateResult.ResultingObject.ToSalesOrderKey(); return(SyncParameters.Using(new SuccessResult <string>(salesOrderKey), new SyncSalesOrderParameters { SalesOrderKey = salesOrderKey, New = false })); }
public IResult UpdateLocation(IUpdateLocationParameters parameters) { var parameterResult = parameters.ToParsedParameters(); if (!parameterResult.Success) { return(parameterResult); } var employeeResult = new GetEmployeeCommand(_facilityUnitOfWork).GetEmployee(parameters); if (!employeeResult.Success) { return(employeeResult.ConvertTo <string>()); } var result = new UpdateLocationCommand(_facilityUnitOfWork).UpdateLocation(parameterResult.ResultingObject); if (!result.Success) { return(result); } _facilityUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), new SyncLocationsParameters { EmployeeKey = employeeResult.ResultingObject, Locations = new List <ILocationKey> { parameterResult.ResultingObject.LocationKey } })); }
public IResult PostInvoice(string customerOrderKey) { var orderKeyResult = KeyParserHelper.ParseResult <ISalesOrderKey>(customerOrderKey); if (!orderKeyResult.Success) { return(orderKeyResult); } var orderKey = orderKeyResult.ResultingObject.ToSalesOrderKey(); var order = _inventoryShipmentOrderUnitOfWork.SalesOrderRepository.FindByKey(orderKey, o => o.InventoryShipmentOrder.ShipmentInformation); if (order == null) { return(new InvalidResult(string.Format(UserMessages.SalesOrderNotFound, orderKey))); } if (order.InventoryShipmentOrder.ShipmentInformation.Status != ShipmentStatus.Shipped) { return(new InvalidResult(string.Format(UserMessages.SalesOrderNotShipped, orderKey))); } order.InvoiceDate = order.InvoiceDate ?? DateTime.Now.ToLocalTime().Date; order.OrderStatus = SalesOrderStatus.Invoiced; _inventoryShipmentOrderUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), orderKey)); }
public IResult SetPickedInventory(string contextKey, ISetPickedInventoryParameters parameters) { var orderKeyResult = KeyParserHelper.ParseResult <IInventoryShipmentOrderKey>(contextKey); if (!orderKeyResult.Success) { return(orderKeyResult); } var orderKey = orderKeyResult.ResultingObject.ToInventoryShipmentOrderKey(); var parsedParameters = parameters.PickedInventoryItems.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters); } var setResult = new SetInterWarehouseOrderPickedInventoryConductor(_inventoryShipmentOrderUnitOfWork) .UpdatePickedInventory(orderKey, parameters, _timeStamper.CurrentTimeStamp, parsedParameters.ResultingObject); if (!setResult.Success) { return(setResult); } _inventoryShipmentOrderUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), new SyncInventoryShipmentOrderParameters { InventoryShipmentOrderKey = orderKey, New = false })); }
public IResult DeleteContact(string contactKey) { if(contactKey == null) { throw new ArgumentNullException("contactKey"); } var keyResult = KeyParserHelper.ParseResult<IContactKey>(contactKey); if(!keyResult.Success) { return keyResult; } var key = keyResult.ResultingObject.ToContactKey(); var contact = _companyUnitOfWork.ContactRepository.FindByKey(key, c => c.Addresses); if(contact == null) { return new InvalidResult(string.Format(UserMessages.ContactNotFound, contactKey)); } var addresses = contact.Addresses.ToList(); var tblContacts = addresses .Select(a => { var id = a.OldContextID; _companyUnitOfWork.ContactAddressRepository.Remove(a); return id; }) .Concat(new [] { contact.OldContextID }) .ToList(); _companyUnitOfWork.ContactRepository.Remove(contact); _companyUnitOfWork.Commit(); return SyncParameters.Using(new SuccessResult(), tblContacts); }
public IResult <ISampleOrderJournalEntryReturn> SetJournalEntry(ISetSampleOrderJournalEntryParameters parameters) { var parsedParameters = parameters.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters.ConvertTo <ISampleOrderJournalEntryReturn>()); } var result = new SetSampleJournalEntryCommand(_sampleOrderUnitOfWork).Execute(parsedParameters.ResultingObject); if (!result.Success) { return(result.ConvertTo <ISampleOrderJournalEntryReturn>()); } _sampleOrderUnitOfWork.Commit(); var journalEntry = _sampleOrderUnitOfWork.SampleOrderJournalEntryRepository.Filter(result.ResultingObject.ToSampleOrderJournalEntryKey().FindByPredicate) .Select(SampleOrderJournalEntryProjectors.Select().ExpandAll()) .FirstOrDefault(); return(SyncParameters.Using(new SuccessResult <ISampleOrderJournalEntryReturn>(journalEntry), new SyncSampleOrderParameters { SampleOrderKey = result.ResultingObject.ToSampleOrderKey() })); }
public IResult UpdateProductionBatchResults(IUpdateProductionBatchResultsParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParameters = parameters.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters); } var updateResult = new ProductionBatchResultsConductor(_productionUnitOfWork).Update(_timeStamper.CurrentTimeStamp, parsedParameters.ResultingObject); if (!updateResult.Success) { return(updateResult); } _productionUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), parsedParameters.ResultingObject.LotKey)); }
public IResult DeleteJournalEntry(string journalEntryKey) { var keyResult = KeyParserHelper.ParseResult <ISampleOrderJournalEntryKey>(journalEntryKey); if (!keyResult.Success) { return(keyResult); } var journalEntry = _sampleOrderUnitOfWork.SampleOrderJournalEntryRepository.FindByKey(keyResult.ResultingObject.ToSampleOrderJournalEntryKey()); if (journalEntry == null) { return(new NoWorkRequiredResult()); } var sampleOrderKey = journalEntry.ToSampleOrderKey(); _sampleOrderUnitOfWork.SampleOrderJournalEntryRepository.Remove(journalEntry); _sampleOrderUnitOfWork.Commit(); return(SyncParameters.Using(new SuccessResult(), new SyncSampleOrderParameters { SampleOrderKey = sampleOrderKey })); }
public IResult <string> CreateInventoryTreatmentOrder(ICreateTreatmentOrderParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParameters = new CreateTreatmentOrderConductorParameters <ICreateTreatmentOrderParameters>(parameters); if (!parsedParameters.Result.Success) { return(parsedParameters.Result.ConvertTo <string>()); } var createResult = new CreateTreatmentOrderConductor(_inventoryShipmentOrderUnitOfWork).CreateTreatmentOrder(_timeStamper.CurrentTimeStamp, parsedParameters); if (!createResult.Success) { return(createResult.ConvertTo <string>()); } _inventoryShipmentOrderUnitOfWork.Commit(); var key = createResult.ResultingObject.ToInventoryShipmentOrderKey(); return(SyncParameters.Using(new SuccessResult <string>(key), new SyncInventoryShipmentOrderParameters { InventoryShipmentOrderKey = key, New = true })); }
public IResult AddLotAttributes(IAddLotAttributesParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var parsedParameters = parameters.ToParsedParameters(); if (!parsedParameters.Success) { return(parsedParameters); } var setAttributesResult = new SetLotAttributesConductor(_lotUnitOfWork).AddLotAttributes(_timeStamper.CurrentTimeStamp, parsedParameters.ResultingObject); if (!setAttributesResult.Success) { return(setAttributesResult); } _lotUnitOfWork.Commit(); var syncParameters = new SynchronizeLotParameters { LotKeys = parsedParameters.ResultingObject.LotKeys, OverrideOldContextLotAsCompleted = parameters.OverrideOldContextLotAsCompleted }; return(SyncParameters.Using(new SuccessResult <ILotStatInfoReturn>(new LotStatInfoReturn(syncParameters)), syncParameters)); }