public RegisterBillOfLadingCommand Build() { CheckValidState(); _command.Rows = _rows.ToArray(); var cmd = _command; _command = null; return cmd; }
public RegisterBillOfLadingCommand Build() { CheckValidState(); _command.Rows = _rows.ToArray(); var cmd = _command; _command = null; return(cmd); }
public void RegisterBillOfLading(RegisterBillOfLadingCommand command) { _debug.Debug("[purchases] Handling registration of new Bill of lading"); var bol = new BillOfLading(command.Id, command.Number,command.IssueDate,DateTime.Today); bol.SetSupplier(command.SupplierCompanyName, command.SupplierAddress); foreach (var row in command.Rows) { bol.AddDetail(row.ItemId, row.Sku, row.Description, row.Quantity); } bol.Confirm(); _repository.Save(bol, command.Id); _debug.Debug("[purchases] Bill of lading confirmed"); }
public RegisterBillOfLadingCommandBuilder(Guid commandId) { _command = new RegisterBillOfLadingCommand(commandId); _rows = new List<RegisterBillOfLadingCommand.Row>(); }
public RegisterBillOfLadingCommandBuilder(Guid commandId) { _command = new RegisterBillOfLadingCommand(commandId); _rows = new List <RegisterBillOfLadingCommand.Row>(); }