public void SetState(long applicationId, long stateId) { _editor.SetState(applicationId, stateId); _events.Add(applicationId, EventType.ApplicationSetState, EventState.Emailing, new ApplicationSetStateEventData { StateId = stateId, Timestamp = DateTimeProvider.Now }); }
public void SetState(long applicationId, long stateId) { if (!HasPermissionToSetState(stateId)) { throw new AccessForbiddenException("User don't have access to the state " + stateId); } // todo: 2. test logic with states (260) if (stateId == _config.CargoInStockStateId) { _editor.SetDateInStock(applicationId, DateTimeProvider.Now); } _editor.SetState(applicationId, stateId); }