private void UpdateOperation(SelfDeliveryCashDistributionDocument selfDeliveryCashDistributionDocument) { selfDeliveryCashDistributionDocument.OrganisationCashMovementOperation.OperationTime = DateTime.Now; selfDeliveryCashDistributionDocument.OrganisationCashMovementOperation.Organisation = selfDeliveryCashDistributionDocument.Organisation; selfDeliveryCashDistributionDocument.OrganisationCashMovementOperation.Amount = selfDeliveryCashDistributionDocument.Amount; }
private void UpdateDocument(SelfDeliveryCashDistributionDocument selfDeliveryCashDistributionDocument, Expense expense, Order selfDeliveryOrder, Employee editor) { selfDeliveryCashDistributionDocument.LastEditedTime = DateTime.Now; selfDeliveryCashDistributionDocument.LastEditor = editor; selfDeliveryCashDistributionDocument.Amount = -expense.Money; if (selfDeliveryCashDistributionDocument.Order.Id != selfDeliveryOrder.Id) { selfDeliveryCashDistributionDocument.Order = selfDeliveryOrder; selfDeliveryCashDistributionDocument.Organisation = selfDeliveryOrder.Contract.Organization; } }
private void Save(IUnitOfWork uow, OrganisationCashMovementOperation operation, SelfDeliveryCashDistributionDocument selfDeliveryCashDistributionDoc) { uow.Save(operation); uow.Save(selfDeliveryCashDistributionDoc); }