public void EditOrder(int userId, Order order, OrderLumberLineItem[] lumberLineItems, OrderMiscellaneousLineItem[] miscLineItems) { var builder = new EditOrderBuilder(userId, order, lumberLineItems, miscLineItems); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void WarehouseReceivedOrder(int userId, Order order) { var builder = new WarehouseReceviedOrderBuilder(userId, order); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void DeleteOrder(int userId, Order order) { var builder = new DeleteOrderBuilder(userId, order); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void UpdateUserRoles(UserProfile user) { var builder = new UpdateUserRolesBuilder(user); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void SavePackages(int userId, Guid orderId, PackageLumberLineItem[] lumberLineItems, PackageMiscellaneousLineItem[] miscLineItems) { var builder = new SavePackagesBuilder(userId, orderId, lumberLineItems, miscLineItems); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void PullOrder(int userId, Guid orderId, int minutesTaken) { var builder = new PullOrderBuilder(userId, orderId, minutesTaken); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void InventoryAudit(int userId, TransactionTypes transactionType, LumberProduct[] lumberProducts, MiscellaneousProduct[] miscProducts) { var transactionTypeId = GetTransactionTypeIdByEnum(transactionType); var builder = new InventoryAuditBuilder(userId, transactionTypeId, lumberProducts, miscProducts); var transaction = new TransactionalCommand(builder.Commands); transaction.Execute(); }
public void DoSomethingTransactional() { var command = new TransactionalCommand(); using (var scope = this.transactionManager.CreateScope(TransactionScopeOption.Required)) { this.transactionManager.CurrentTransaction.EnlistVolatile(command, EnlistmentOptions.None); command.Execute(); scope.Complete(); } }
public T CreateStep <T>(TransactionalCommand command) where T : TransactionStep, new() { T step = new T(); int stepNumber = Steps.Count; step.StepNumber = stepNumber; step.Command = command; step.TransactionName = TransactionName; Steps.Add(step); return(step); }
public void UpdatePackages(Package[] packages) { var transaction = new TransactionalCommand(packages.Select(p => new UpdatePackage(p))); transaction.Execute(); }